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

Function quantize_one_batch

include/rabitqlib/quantization/rabitq.hpp:37–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35inline void quantize_one_batch(
36 const T* data,
37 const T* centroid,
38 size_t num,
39 size_t padded_dim,
40 char* batch_data,
41 MetricType metric_type = METRIC_L2
42) {
43 BatchDataMap<T> this_batch(batch_data, padded_dim);
44
45 rabitq_impl::one_bit::one_bit_batch_code(
46 data,
47 centroid,
48 num,
49 padded_dim,
50 this_batch.bin_code(),
51 this_batch.f_add(),
52 this_batch.f_rescale(),
53 this_batch.f_error(),
54 metric_type
55 );
56}
57
58template <typename T, bool Parallel = false>
59inline void quantize_one_batch(
60 const T* data,
61 size_t num,

Callers 1

quantize_split_batchFunction · 0.85

Calls 6

one_bit_batch_codeFunction · 0.85
bin_codeMethod · 0.45
f_addMethod · 0.45
f_rescaleMethod · 0.45
f_errorMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected