MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / bitreverse8

Function bitreverse8

tests/unit/rabitqlib/utils/rotator_test.cpp:42–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42uint8_t bitreverse8(uint8_t x) {
43 x = (((x & 0x55) << 1) | ((x & 0xAA) >> 1));
44 x = (((x & 0x33) << 2) | ((x & 0xCC) >> 2));
45 x = (((x & 0x0F) << 4) | ((x & 0xF0) >> 4));
46 return x;
47}
48TEST(FlipSignTest, FlipWorks) {
49 const size_t dim = 128;
50 float data[dim];

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected