MCPcopy Create free account
hub / github.com/alibaba/MNN / atLestBitsCnt

Function atLestBitsCnt

source/core/ConvolutionCommon.cpp:52–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static uint32_t atLestBitsCnt(uint32_t n) {
53 for (uint32_t i = 0; i < 32; i++) {
54 int32_t t = n << i;
55 if (t < 0)
56 return 32 - i - (((t << 1) == 0) ? 1 : 0);
57 }
58 return 0;
59}
60
61static void SplitBufToArray(uint8_t *buf, size_t bufLen, uint8_t *arr, size_t arrLen, size_t iNeedBits) {
62 unsigned char cMask = (1 << (iNeedBits)) - 1;

Callers 2

ReadQuanInfoFunction · 0.85
ReadQuanData_cFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected