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

Function get_column

include/rabitqlib/fastscan/fastscan.hpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44template <typename T, class TA>
45static inline void get_column(
46 const T* src, size_t rows, size_t cols, size_t row, size_t col, TA& dest
47) {
48 size_t k = 0;
49 size_t max_k = std::min(rows - row, dest.size());
50 for (; k < max_k; ++k) {
51 dest[k] = src[((k + row) * cols) + col];
52 }
53 if (k < dest.size()) {
54 std::fill(dest.begin() + k, dest.end(), 0);
55 }
56}
57
58/**
59 * @brief Pack quantization codes, store in blocks, the data orgnization is illustrated in
60 * the link and kPerm0. Since we pack codes as 32-sized groups, if the num is not a multiple

Callers 1

pack_codesFunction · 0.85

Calls 4

fillFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected