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

Function TEST_F

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

Test that FhtKacRotator is chosen by default

Source from the content-addressed store, hash-verified

28
29// Test that FhtKacRotator is chosen by default
30TEST_F(RotatorTest, DefaultRotatorType) {
31 Rotator<float>* rotator = choose_rotator<float>(dim);
32 ASSERT_NE(rotator, nullptr);
33
34 // FhtKacRotator pads to multiple of 64
35 size_t padded_dim = rotator->size();
36 EXPECT_EQ(padded_dim % 64, 0);
37 EXPECT_GE(padded_dim, dim);
38
39 delete rotator;
40}
41
42uint8_t bitreverse8(uint8_t x) {
43 x = (((x & 0x55) << 1) | ((x & 0xAA) >> 1));

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected