| 35 | inline 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 | |
| 58 | template <typename T, bool Parallel = false> |
| 59 | inline void quantize_one_batch( |
| 60 | const T* data, |
| 61 | size_t num, |
no test coverage detected