Returns the position of the k-th 1 in the 64-bit word x. k is 0-based, so k=0 returns the position of the first 1.
Declared in <folly/compression/Select64.h>
Returns the position of the k-th 1 in the 64-bit word x. k is 0-based, so k=0 returns the position of the first 1.
template<class Instructions>
uint64_t
select64(
uint64_t x,
uint64_t k);
» more...
template<>
uint64_t
select64<Haswell>(
uint64_t x,
uint64_t k);
» more...
The bit position of the k-th set bit in x.
| Name | Description |
|---|---|
| x | The 64-bit word to search. |
| k | The 0-based index of the set bit to locate. |