MCPcopy Create free account
hub / github.com/alibaba/zvec / decode

Method decode

src/ailego/algorithm/integer_quantizer.cc:303–308  ·  view source on GitHub ↗

Decode from INT16

Source from the content-addressed store, hash-verified

301
302// Decode from INT16
303void EntropyInt16Quantizer::decode(const int16_t *in, size_t dim,
304 float *out) const {
305 for (size_t i = 0; i < dim; ++i) {
306 out[i] = in[i] * this->scale_reciprocal() - this->bias();
307 }
308}
309
310// Feed the UINT16 quantizer
311bool EntropyUInt16Quantizer::feed(const float *vec, size_t dim) {

Callers

nothing calls this directly

Calls 2

scale_reciprocalMethod · 0.80
biasMethod · 0.80

Tested by

no test coverage detected