| layout | stdlib-reference |
|---|
Population count. Counts the number of set bits in the binary representation of a value.
uint countbits(uint value); vector<uint, N> countbits<N:int>(vector<uint, N> value);
The value to count bits in.
The value to count bits in.
The number of bits in the binary representation of value that are set to one.
For SPIR-V, this function maps to OpBitCount.
Defined for the following targets:
Available in all stages.
Available in all stages.
Available in all stages.
Available in all stages.
Available in all stages.
Available in all stages.
Available in all stages.