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

Function quantize_scalar

include/rabitqlib/quantization/rabitq.hpp:323–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321
322template <typename T, typename TP>
323inline void quantize_scalar(
324 const T* data,
325 size_t dim,
326 size_t total_bits,
327 TP* total_code,
328 T& delta,
329 T& vl,
330 RabitqConfig config = RabitqConfig(),
331 ScalarQuantizerType scalar_quantizer_type = ScalarQuantizerType::RECONSTRUCTION
332) {
333 std::vector<T> centroid(dim, 0);
334 rabitq_impl::total_bits::rabitq_scalar_impl<T, TP>(
335 data,
336 centroid.data(),
337 dim,
338 total_bits,
339 total_code,
340 delta,
341 vl,
342 config.t_const,
343 scalar_quantizer_type
344 );
345}
346
347template <typename T, typename TP>
348inline void quantize_scalar(

Callers 1

mainFunction · 0.85

Calls 2

RabitqConfigClass · 0.85
dataMethod · 0.45

Tested by

no test coverage detected