rapidsai / raft

RAFT contains fundamental widely-used algorithms and primitives for machine learning and information retrieval. The algorithms are CUDA-accelerated and form building blocks for more easily writing high performance applications.
https://docs.rapids.ai/api/raft/stable/
Apache License 2.0
683 stars 180 forks source link

ANN_BENCH: common AnnBase::index_type #2315

Closed achirkin closed 1 month ago

achirkin commented 1 month ago

Replace the size_t type in the AnnBase::search for the output neighbor indices with a common AnnBase::index_type. This PR stops short of changing the behavior of the benchmarks, since it keeps using index_type = size_t.

The introduction of the new type has couple benefits:

As a small extra change, I've factored out common IVF-PQ - CAGRA-Q refinement code into a separate refine_helper function.

achirkin commented 1 month ago

/merge