| 44 | template <typename T, class TA> |
| 45 | static 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 |
no test coverage detected