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

Function padding_requirement

include/rabitqlib/utils/rotator.hpp:45–54  ·  view source on GitHub ↗

get padding requirement for different rotator

Source from the content-addressed store, hash-verified

43
44namespace rotator_impl {
45
46// get padding requirement for different rotator
47inline size_t padding_requirement(size_t dim, RotatorType type) {
48 if (type == RotatorType::MatrixRotator) {
49 return dim;
50 }
51 if (type == RotatorType::FhtKacRotator) {
52 return round_up_to_multiple(dim, 64);
53 }
54 std::cerr << "Invalid rotator type in padding_requirement()\n" << std::flush;
55 exit(1);
56}
57

Callers 1

choose_rotatorFunction · 0.85

Calls 1

round_up_to_multipleFunction · 0.85

Tested by

no test coverage detected