| 77 | |
| 78 | template <MetricType metric> |
| 79 | bool |
| 80 | INT8Quantizer<metric>::EncodeBatchImpl(const DataType* data, uint8_t* codes, uint64_t count) { |
| 81 | const auto* data_ptr = reinterpret_cast<const int8_t*>(data); |
| 82 | for (uint64_t i = 0; i < count; ++i) { |
| 83 | EncodeOneImpl(reinterpret_cast<const float*>(data_ptr + i * this->dim_), |
| 84 | codes + i * this->code_size_); |
| 85 | } |
| 86 | return true; |
| 87 | } |
| 88 | |
| 89 | template <MetricType metric> |
| 90 | bool |