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

Function pack_binary

include/rabitqlib/utils/space.hpp:176–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 assert_integral<T>();
175 scalar_impl::scalar_quantize_optimized(result, vec0, dim, lo, delta);
176}
177
178template <typename T>
179inline std::vector<T> compute_centroid(
180 const T* data, size_t num_points, size_t dim, size_t num_threads
181) {
182 const auto thread_count = static_cast<int>(std::max<size_t>(
183 1,
184 std::min(
185 {num_threads,
186 std::max<size_t>(num_points, 1),
187 static_cast<size_t>(std::numeric_limits<int>::max())}
188 )
189 ));
190 std::vector<std::vector<T>> all_results(thread_count, std::vector<T>(dim, 0));
191
192#pragma omp parallel for schedule(dynamic) num_threads(thread_count)

Callers 1

one_bit_compact_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected