11 #include "../GpuIndicesOptions.h"
12 #include "../utils/Tensor.cuh"
13 #include <thrust/device_vector.h>
17 namespace faiss {
namespace gpu {
21 void runCalcListOffsets(Tensor<int, 2, true>& topQueryToCentroid,
22 thrust::device_vector<int>& listLengths,
23 Tensor<int, 2, true>& prefixSumOffsets,
24 Tensor<char, 1, true>& thrustMem,
28 void runPass1SelectLists(Tensor<int, 2, true>& prefixSumOffsets,
29 Tensor<float, 1, true>& distance,
33 Tensor<float, 3, true>& heapDistances,
34 Tensor<int, 3, true>& heapIndices,
39 void runPass2SelectLists(Tensor<float, 2, true>& heapDistances,
40 Tensor<int, 2, true>& heapIndices,
41 thrust::device_vector<void*>& listIndices,
42 IndicesOptions indicesOptions,
43 Tensor<int, 2, true>& prefixSumOffsets,
44 Tensor<int, 2, true>& topQueryToCentroid,
47 Tensor<float, 2, true>& outDistances,
48 Tensor<long, 2, true>& outIndices,