MCPcopy Create free account
hub / github.com/andeya/algorithm / bcnt

Function bcnt

mathutil/all_test.go:1018–1023  ·  view source on GitHub ↗

* From: http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan Counting bits set, Brian Kernighan's way unsigned int v; // count the number of bits set in v unsigned int c; // c accumulates the total bits set in v for (c = 0; v; c++) { v &= v - 1; // clear the least significa

(v uint64)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

TestPopCountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected