| 321 | |
| 322 | template <typename T, typename TP> |
| 323 | inline 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 | |
| 347 | template <typename T, typename TP> |
| 348 | inline void quantize_scalar( |
no test coverage detected