MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / BitPrecision

Function BitPrecision

extra/yassl/taocrypt/src/misc.cpp:135–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134
135unsigned int BitPrecision(word value)
136{
137 if (!value)
138 return 0;
139
140 unsigned int l = 0,
141 h = 8 * sizeof(value);
142
143 while (h-l > 1)
144 {
145 unsigned int t = (l+h)/2;
146 if (value >> t)
147 l = t;
148 else
149 h = t;
150 }
151
152 return h;
153}
154
155
156word Crop(word value, unsigned int size)

Callers 2

RoundupSizeFunction · 0.85
AS2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected