MCPcopy Create free account
hub / github.com/GJDuck/e9patch / tzcount

Function tzcount

src/e9patch/e9mapping.cpp:61–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 */
60template <typename Key>
61static unsigned tzcount(Key key)
62{
63 if (key.none())
64 return key.size();
65 Key mask = 0xFFFFFFFFFFFFFFFFull;
66 for (unsigned count = 0; ; count += 64)
67 {
68 uint64_t key64 = (key & mask).to_ullong();
69 if (key64 != 0)
70 return count + __builtin_ctzll(key64);
71 key >>= 64;
72 }
73}
74template <>
75unsigned tzcount<Key128>(Key128 key)
76{

Callers 1

insertFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected