/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include namespace faiss { namespace gpu { // Calculates residual v_i - c_j for all v_i in vecs where j = vecToCentroid[i] void runCalcResidual(Tensor& vecs, Tensor& centroids, Tensor& vecToCentroid, Tensor& residuals, cudaStream_t stream); void runCalcResidual(Tensor& vecs, Tensor& centroids, Tensor& vecToCentroid, Tensor& residuals, cudaStream_t stream); // Gather vectors void runReconstruct(Tensor& listIds, Tensor& vecs, Tensor& out, cudaStream_t stream); void runReconstruct(Tensor& listIds, Tensor& vecs, Tensor& out, cudaStream_t stream); } } // namespace