Faiss

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
PQScanMultiPassNoPrecomputed.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 <thrust/device_vector.h>
14
15 namespace faiss { namespace gpu {
16
17 class GpuResources;
18
19 /// For no precomputed codes, is this a supported number of dimensions
20 /// per subquantizer?
21 bool isSupportedNoPrecomputedSubDimSize(int dims);
22
23 void runPQScanMultiPassNoPrecomputed(Tensor<float, 2, true>& queries,
24 Tensor<float, 2, true>& centroids,
25 Tensor<float, 3, true>& pqCentroidsInnermostCode,
26 Tensor<int, 2, true>& topQueryToCentroid,
27 bool useFloat16Lookup,
28 int bytesPerCode,
29 int numSubQuantizers,
30 int numSubQuantizerCodes,
31 thrust::device_vector<void*>& listCodes,
32 thrust::device_vector<void*>& listIndices,
33 IndicesOptions indicesOptions,
34 thrust::device_vector<int>& listLengths,
35 int maxListLength,
36 int k,
37 // output
38 Tensor<float, 2, true>& outDistances,
39 // output
40 Tensor<long, 2, true>& outIndices,
41 GpuResources* res);
42
43 } } // namespace