All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
faiss::InvertedLists Struct Referenceabstract

`#include <IndexIVF.h>`

Inheritance diagram for faiss::InvertedLists:

## Public Types

typedef Index::idx_t | idx_t

## Public Member Functions

| InvertedLists (size_t nlist, size_t code_size)
virtual size_t | list_size (size_t list_no) const =0
| get the size of a list
virtual const uint8_t * | get_codes (size_t list_no) const =0
virtual const idx_t * | get_ids (size_t list_no) const =0
virtual idx_t | get_single_id (size_t list_no, size_t offset) const
virtual const uint8_t * | get_single_code (size_t list_no, size_t offset) const
virtual void | prefetch_lists (const long *list_nos, int nlist) const
virtual size_t | add_entry (size_t list_no, idx_t theid, const uint8_t *code)
| add one entry to an inverted list
virtual size_t | add_entries (size_t list_no, size_t n_entry, const idx_t *ids, const uint8_t *code)=0
virtual void | update_entry (size_t list_no, size_t offset, idx_t id, const uint8_t *code)
virtual void | update_entries (size_t list_no, size_t offset, size_t n_entry, const idx_t *ids, const uint8_t *code)=0
virtual void | resize (size_t list_no, size_t new_size)=0
virtual void | reset ()

## Public Attributes

size_t | nlist
| number of possible key values
size_t | code_size
| code size per vector in bytes

## Detailed Description

Table of inverted lists multithreading rules:

- concurrent read accesses are allowed
- concurrent update accesses are allowed
- for resize and add_entries, only concurrent access to different lists are allowed

Definition at line 67 of file IndexIVF.h.

## Member Function Documentation

virtual const uint8_t* faiss::InvertedLists::get_codes | ( | size_t | list_no | ) | const

pure virtual

Returns
  codes size list_size * code_size

Implemented in faiss::ArrayInvertedLists, and faiss::OnDiskInvertedLists.

virtual const idx_t* faiss::InvertedLists::get_ids | ( | size_t | list_no | ) | const

pure virtual

Returns
  ids size list_size

Implemented in faiss::ArrayInvertedLists, and faiss::OnDiskInvertedLists.

const uint8_t * faiss::InvertedLists::get_single_code | ( | size_t | list_no,
|  | size_t | offset
| ) |  | const

virtual

Returns
  a single code in an inverted list

Definition at line 129 of file IndexIVF.cpp.

InvertedLists::idx_t faiss::InvertedLists::get_single_id | ( | size_t | list_no,
|  | size_t | offset
| ) |  | const

virtual

Returns
  a single id in an inverted list

Definition at line 118 of file IndexIVF.cpp.

void faiss::InvertedLists::prefetch_lists | ( | const long * | list_nos,
|  | int | nlist
| ) |  | const

virtual

prepare the following lists (default does nothing) a list can be -1 hence the signed long

Reimplemented in faiss::OnDiskInvertedLists.

Definition at line 126 of file IndexIVF.cpp.

The documentation for this struct was generated from the following files:

- /data/users/matthijs/github_faiss/faiss/IndexIVF.h
- /data/users/matthijs/github_faiss/faiss/IndexIVF.cpp