| 292 | |
| 293 | // Encode to INT16 |
| 294 | void EntropyInt16Quantizer::encode(const float *in, size_t dim, |
| 295 | int16_t *out) const { |
| 296 | for (size_t i = 0; i < dim; ++i) { |
| 297 | out[i] = static_cast<int16_t>( |
| 298 | std::round(QuantizeValue<MIN_VALUE, MAX_VALUE>(in[i], scale_, bias_))); |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | // Decode from INT16 |
| 303 | void EntropyInt16Quantizer::decode(const int16_t *in, size_t dim, |
nothing calls this directly
no test coverage detected