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