MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bitcnt

Function bitcnt

dpdk/examples/ipv4_multicast/main.c:181–190  ·  view source on GitHub ↗

Get number of bits set. 8< */

Source from the content-addressed store, hash-verified

179
180/* Get number of bits set. 8< */
181static inline uint32_t
182bitcnt(uint32_t v)
183{
184 uint32_t n;
185
186 for (n = 0; v != 0; v &= v - 1, n++)
187 ;
188
189 return n;
190}
191/* >8 End of getting number of bits set. */
192
193/**

Callers 1

mcast_forwardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected