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

Function bitCount

src/backend/oneapi/moments.cpp:18–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace oneapi {
17
18static inline unsigned bitCount(unsigned v) {
19 v = v - ((v >> 1U) & 0x55555555U);
20 v = (v & 0x33333333U) + ((v >> 2U) & 0x33333333U);
21 return (((v + (v >> 4U)) & 0xF0F0F0FU) * 0x1010101U) >> 24U;
22}
23
24template<typename T>
25Array<float> moments(const Array<T> &in, const af_moment_type moment) {

Callers 1

momentsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected