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

Function test_clz32

dpdk/app/test/test_bitcount.c:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13RTE_LOG_REGISTER(bitcount_logtype_test, test.bitcount, INFO);
14
15static int
16test_clz32(void)
17{
18 size_t leading;
19 uint32_t v = 0xffffffff;
20
21 for (leading = 0; v; leading++) {
22 RTE_TEST_ASSERT(rte_clz32(v) == leading,
23 "Unexpected count.");
24 v >>= 1;
25 }
26
27 return 0;
28}
29
30static int
31test_clz64(void)

Callers

nothing calls this directly

Calls 1

rte_clz32Function · 0.85

Tested by

no test coverage detected