Struct faiss::NormTableScaler

struct NormTableScaler

consumes 2x4 bits to encode a norm as a scalar additive quantizer the norm is scaled because its range if larger than other components

Public Functions

inline explicit NormTableScaler(int scale)
inline simd32uint8 lookup(const simd32uint8 &lut, const simd32uint8 &c) const
inline simd16uint16 scale_lo(const simd32uint8 &res) const
inline simd16uint16 scale_hi(const simd32uint8 &res) const
template<class dist_t>
inline dist_t scale_one(const dist_t &x) const

Public Members

int scale_int
simd16uint16 scale_simd

Public Static Attributes

static constexpr int nscale = 2