Struct faiss::CodePacker
-
struct CodePacker
Packing consists in combining a fixed number of codes of constant size (code_size) into a block of data where they may (or may not) be interleaved for efficient consumption by distance computation kernels. This exists for the “fast_scan” indexes on CPU and for some GPU kernels.
Subclassed by faiss::CodePackerFlat, faiss::CodePackerPQ4
Public Functions
-
virtual void pack_1(const uint8_t *flat_code, size_t offset, uint8_t *block) const = 0
-
virtual void unpack_1(const uint8_t *block, size_t offset, uint8_t *flat_code) const = 0
-
virtual void pack_all(const uint8_t *flat_codes, uint8_t *block) const
-
virtual void unpack_all(const uint8_t *block, uint8_t *flat_codes) const
-
inline virtual ~CodePacker()
Public Members
-
size_t code_size
-
size_t nvec
-
size_t block_size
-
virtual void pack_1(const uint8_t *flat_code, size_t offset, uint8_t *block) const = 0