Faiss

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
PQScanMultiPassNoPrecomputed.cuh
1 /**
2 * Copyright (c) 2015-present, Facebook, Inc.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD+Patents license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9
10 #pragma once
11
12 #include "../GpuIndicesOptions.h"
13 #include "../utils/Tensor.cuh"
14 #include <thrust/device_vector.h>
15
16 namespace faiss { namespace gpu {
17
18 class GpuResources;
19
20 /// For no precomputed codes, is this a supported number of dimensions
21 /// per subquantizer?
22 bool isSupportedNoPrecomputedSubDimSize(int dims);
23
24 void runPQScanMultiPassNoPrecomputed(Tensor<float, 2, true>& queries,
25 Tensor<float, 2, true>& centroids,
26 Tensor<float, 3, true>& pqCentroidsInnermostCode,
27 Tensor<int, 2, true>& topQueryToCentroid,
28 bool useFloat16Lookup,
29 int bytesPerCode,
30 int numSubQuantizers,
31 int numSubQuantizerCodes,
32 thrust::device_vector<void*>& listCodes,
33 thrust::device_vector<void*>& listIndices,
34 IndicesOptions indicesOptions,
35 thrust::device_vector<int>& listLengths,
36 int maxListLength,
37 int k,
38 // output
39 Tensor<float, 2, true>& outDistances,
40 // output
41 Tensor<long, 2, true>& outIndices,
42 GpuResources* res);
43
44 } } // namespace