Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
PQScanMultiPassPrecomputed.cuh
1 /**
2  * Copyright (c) Facebook, Inc. and its affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 
9 #pragma once
10 
11 #include "../GpuIndicesOptions.h"
12 #include "../utils/Tensor.cuh"
13 #include "../utils/NoTypeTensor.cuh"
14 #include <thrust/device_vector.h>
15 
16 namespace faiss { namespace gpu {
17 
18 class GpuResources;
19 
20 void runPQScanMultiPassPrecomputed(Tensor<float, 2, true>& queries,
21  Tensor<float, 2, true>& precompTerm1,
22  NoTypeTensor<3, true>& precompTerm2,
23  NoTypeTensor<3, true>& precompTerm3,
24  Tensor<int, 2, true>& topQueryToCentroid,
25  bool useFloat16Lookup,
26  int bytesPerCode,
27  int numSubQuantizers,
28  int numSubQuantizerCodes,
29  thrust::device_vector<void*>& listCodes,
30  thrust::device_vector<void*>& listIndices,
31  IndicesOptions indicesOptions,
32  thrust::device_vector<int>& listLengths,
33  int maxListLength,
34  int k,
35  // output
36  Tensor<float, 2, true>& outDistances,
37  // output
38  Tensor<long, 2, true>& outIndices,
39  GpuResources* res);
40 
41 } } // namespace