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 CC-by-NC license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9 // Copyright 2004-present Facebook. All Rights Reserved.
10
11 #pragma once
12
13 #include "../GpuIndicesOptions.h"
14 #include "../utils/Tensor.cuh"
15 #include <thrust/device_vector.h>
16
17 namespace faiss { namespace gpu {
18
19 class GpuResources;
20
21 /// For no precomputed codes, is this a supported number of dimensions
22 /// per subquantizer?
23 bool isSupportedNoPrecomputedSubDimSize(int dims);
24
25 void runPQScanMultiPassNoPrecomputed(Tensor<float, 2, true>& queries,
26 Tensor<float, 2, true>& centroids,
27 Tensor<float, 3, true>& pqCentroidsInnermostCode,
28 Tensor<int, 2, true>& topQueryToCentroid,
29 bool useFloat16Lookup,
30 int bytesPerCode,
31 int numSubQuantizers,
32 int numSubQuantizerCodes,
33 thrust::device_vector<void*>& listCodes,
34 thrust::device_vector<void*>& listIndices,
35 IndicesOptions indicesOptions,
36 thrust::device_vector<int>& listLengths,
37 int maxListLength,
38 int k,
39 // output
40 Tensor<float, 2, true>& outDistances,
41 // output
42 Tensor<long, 2, true>& outIndices,
43 GpuResources* res);
44
45 } } // namespace