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