Struct faiss::HCounterStateΒΆ

template<class HammingComputer>
struct HCounterState

This class maintains a list of best distances seen so far.

Since the distances are in a limited range (0 to nbit), the object maintains one list per possible distance, and fills in only the n-first lists, such that the sum of sizes of the n lists is below k.

Public Functions

inline HCounterState(int *counters, int64_t *ids_per_dis, const uint8_t *x, int d, int k)
inline void update_counter(const uint8_t *y, size_t j)

Public Members

int *counters
int64_t *ids_per_dis
HammingComputer hc
int thres
int count_lt
int count_eq
int k