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

Function scalar_quantize

include/rabitqlib/utils/space.hpp:199–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197 for (size_t i = 0; i < num_points; ++i) {
198 auto tid = omp_get_thread_num();
199 AnnCandidate<T, PID>& cur_entry = best_entries[tid];
200 const T* cur_data = data + (dim * i);
201
202 T distance = dist_func(cur_data, query, dim);
203 if (distance < cur_entry.distance) {
204 cur_entry.id = static_cast<PID>(i);
205 cur_entry.distance = distance;
206 }
207 }

Callers 1

LutMethod · 0.85

Calls 1

Tested by

no test coverage detected