Struct faiss::ReservoirBlockResultHandler
-
template<class C, bool use_sel = false>
struct ReservoirBlockResultHandler : public faiss::BlockResultHandler<C, false> -
Public Functions
-
inline ReservoirBlockResultHandler(size_t nq, T *heap_dis_tab, TI *heap_ids_tab, size_t k, const IDSelector *sel = nullptr)
-
inline virtual void begin_multiple(size_t i0_2, size_t i1_2)
begin
-
inline void add_results(size_t j0, size_t j1, const T *dis_tab)
add results for query i0..i1 and j0..j1
-
inline virtual void end_multiple() final
series of results for queries i0..i1 is done
-
inline virtual void add_results(size_t, size_t, const typename C::T*)
-
inline bool is_in_selection(idx_t i) const
Public Members
-
T *heap_dis_tab
-
TI *heap_ids_tab
-
int64_t k
-
size_t capacity
-
std::vector<ReservoirTopN<C>> reservoirs
-
size_t nq
-
const IDSelector *sel
-
size_t i0
-
size_t i1
-
struct SingleResultHandler : public faiss::ReservoirTopN<C>
-
Public Functions
-
inline explicit SingleResultHandler(ReservoirBlockResultHandler &hr)
-
inline void begin(size_t qno_2)
begin results for query # i
-
inline void end()
series of results for query qno is done
-
inline void shrink_fuzzy()
-
inline void shrink()
-
inline explicit SingleResultHandler(ReservoirBlockResultHandler &hr)
-
inline ReservoirBlockResultHandler(size_t nq, T *heap_dis_tab, TI *heap_ids_tab, size_t k, const IDSelector *sel = nullptr)