public class BitCount extends Object
int
.
Derived from http ://dalkescientific.com/writings/diary/popcnt.c
Constructor and Description |
---|
BitCount() |
Modifier and Type | Method and Description |
---|---|
static int |
count_2(int[] buffer)
Population count, skipping words at even positions
|
static int |
count_2(int[] buffer,
int n)
Population count, skipping words at even positions
|
static int |
count(int[] buffer)
Population count
|
static int |
count(int[] buffer,
int n)
Population count
|
static void |
main(String[] args)
Test
|
public static int count(int[] buffer)
buffer
- array of int
public static int count(int[] buffer, int n)
It counts 24 words at a time, then 3 at a time, then 1 at a time
buffer
- array of int
n
- number of elements of buffer
to countpublic static int count_2(int[] buffer)
buffer
- array of int
public static int count_2(int[] buffer, int n)
It counts 24 words at a time, then 3 at a time, then 1 at a time
buffer
- array of int
n
- number of elements of buffer
to countpublic static void main(String[] args)
args
- Copyright © 2011–2017. All rights reserved.