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

Method batch_data_bytes

include/rabitqlib/index/ivf/ivf.hpp:58–65  ·  view source on GitHub ↗

get num of bytes used for 1-bit code and corresponding factors

Source from the content-addressed store, hash-verified

56 // get num of bytes used for 1-bit code and corresponding factors
57 [[nodiscard]] size_t batch_data_bytes(const std::vector<size_t>& cluster_sizes) const {
58 assert(cluster_sizes.size() == num_cluster_); // num of clusters
59 size_t total_blocks = 0;
60 for (auto size : cluster_sizes) {
61 total_blocks += div_round_up(size, fastscan::kBatchSize);
62 }
63 return total_blocks * BatchDataMap<float>::data_bytes(padded_dim_);
64 }
65
66 [[nodiscard]] size_t ex_data_bytes() const {
67 return ExDataMap<float>::data_bytes(padded_dim_, ex_bits_) * num_;
68 }

Callers

nothing calls this directly

Calls 2

div_round_upFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected