Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Abc-Arbitrage/Disruptor-cpp
/ isPowerOf2
Function
isPowerOf2
Disruptor/Util.cpp:25–28 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
23
}
24
25
bool isPowerOf2(std::int32_t x)
26
{
27
return x > 0 && (x & (x - 1)) == 0;
28
}
29
30
std::int32_t log2(std::int32_t i)
31
{
Callers
1
Sequencer
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected