Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
IVFFlatScan.cuh
1 
2 /**
3  * Copyright (c) 2015-present, Facebook, Inc.
4  * All rights reserved.
5  *
6  * This source code is licensed under the CC-by-NC license found in the
7  * LICENSE file in the root directory of this source tree.
8  */
9 
10 // Copyright 2004-present Facebook. All Rights Reserved.
11 
12 #pragma once
13 
14 #include "../GpuIndicesOptions.h"
15 #include "../utils/Tensor.cuh"
16 #include <thrust/device_vector.h>
17 
18 namespace faiss { namespace gpu {
19 
20 class GpuResources;
21 
22 void runIVFFlatScan(Tensor<float, 2, true>& queries,
23  Tensor<int, 2, true>& listIds,
24  thrust::device_vector<void*>& listData,
25  thrust::device_vector<void*>& listIndices,
26  IndicesOptions indicesOptions,
27  thrust::device_vector<int>& listLengths,
28  int maxListLength,
29  int k,
30  bool l2Distance,
31  bool useFloat16,
32  // output
33  Tensor<float, 2, true>& outDistances,
34  // output
35  Tensor<long, 2, true>& outIndices,
36  GpuResources* res);
37 
38 } } // namespace