Class faiss::gpu::GpuIcmEncoder
-
class GpuIcmEncoder : public faiss::lsq::IcmEncoder
Perform LSQ encoding on GPU.
Split input vectors to different devices and call IcmEncoderImpl::encode to encode them
Public Functions
-
GpuIcmEncoder(const LocalSearchQuantizer *lsq, const std::vector<GpuResourcesProvider*> &provs, const std::vector<int> &devices)
-
~GpuIcmEncoder()
-
GpuIcmEncoder(const GpuIcmEncoder&) = delete
-
GpuIcmEncoder &operator=(const GpuIcmEncoder&) = delete
-
virtual void set_binary_term() override
-
virtual void encode(int32_t *codes, const float *x, std::mt19937 &gen, size_t n, size_t ils_iters) const override
Encode vectors given codebooks
- Parameters:
codes – output codes, size n * M
x – vectors to encode, size n * d
gen – random generator
n – number of vectors
ils_iters – number of iterations of iterative local search
-
GpuIcmEncoder(const LocalSearchQuantizer *lsq, const std::vector<GpuResourcesProvider*> &provs, const std::vector<int> &devices)