MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / bitCount

Function bitCount

src/backend/cuda/moments.cpp:20–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace cuda {
19
20static inline unsigned bitCount(unsigned v) {
21 v = v - ((v >> 1U) & 0x55555555U);
22 v = (v & 0x33333333U) + ((v >> 2U) & 0x33333333U);
23 return (((v + (v >> 4U)) & 0xF0F0F0FU) * 0x1010101U) >> 24U;
24}
25
26using af::dim4;
27

Callers 1

momentsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected