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