Property | Type | Description | |
---|---|---|---|
ntzTable | byte[] |
Method | Description | |
---|---|---|
IsPowerOfTwo ( int v ) : bool |
returns true if v is a power of two or zero
|
|
IsPowerOfTwo ( long v ) : bool |
returns true if v is a power of two or zero
|
|
NextHighestPowerOfTwo ( int v ) : int |
returns the next highest power of two, or the current value if it's already a power of two or zero
|
|
NextHighestPowerOfTwo ( long v ) : long |
returns the next highest power of two, or the current value if it's already a power of two or zero
|
|
Ntz ( int val ) : int |
Returns number of trailing zeros in a 32 bit int value.
|
|
Ntz ( long val ) : int |
Returns number of trailing zeros in a 64 bit long value.
|
|
Ntz2 ( long x ) : int |
returns 0 based index of first set bit (only works for x!=0)
|
|
Ntz3 ( long x ) : int |
returns 0 based index of first set bit
|
|
Pop ( long x ) : int |
Returns the number of bits set in the long
|
|
Pop_andnot ( long A, long B, int wordOffset, int numWords ) : long |
Returns the popcount or cardinality of A & ~B Neither array is modified.
|
|
Pop_array ( long A, int wordOffset, int numWords ) : long |
Returns the number of set bits in an array of longs.
|
|
Pop_intersect ( long A, long B, int wordOffset, int numWords ) : long |
Returns the popcount or cardinality of the two sets after an intersection. Neither array is modified.
|
|
Pop_union ( long A, long B, int wordOffset, int numWords ) : long |
Returns the popcount or cardinality of the union of two sets. Neither array is modified.
|
|
Pop_xor ( long A, long B, int wordOffset, int numWords ) : long |
public static NextHighestPowerOfTwo ( int v ) : int | ||
v | int | |
return | int |
public static NextHighestPowerOfTwo ( long v ) : long | ||
v | long | |
return | long |
public static Pop_andnot ( long A, long B, int wordOffset, int numWords ) : long | ||
A | long | |
B | long | |
wordOffset | int | |
numWords | int | |
return | long |
public static Pop_array ( long A, int wordOffset, int numWords ) : long | ||
A | long | |
wordOffset | int | |
numWords | int | |
return | long |
public static Pop_intersect ( long A, long B, int wordOffset, int numWords ) : long | ||
A | long | |
B | long | |
wordOffset | int | |
numWords | int | |
return | long |
public static Pop_union ( long A, long B, int wordOffset, int numWords ) : long | ||
A | long | |
B | long | |
wordOffset | int | |
numWords | int | |
return | long |
public static Pop_xor ( long A, long B, int wordOffset, int numWords ) : long | ||
A | long | |
B | long | |
wordOffset | int | |
numWords | int | |
return | long |