Faiss

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Public Attributes | List of all members
faiss::SliceInvertedLists Struct Reference

vertical slice of indexes in another InvertedLists More...

`#include <InvertedLists.h>`

Inheritance diagram for faiss::SliceInvertedLists:

## Public Member Functions
| SliceInvertedLists (const InvertedLists *il, idx_t i0, idx_t i1)
size_t | list_size (size_t list_no) const override
| get the size of a list
const uint8_t * | get_codes (size_t list_no) const override
const idx_t * | get_ids (size_t list_no) const override
void | release_codes (size_t list_no, const uint8_t *codes) const override
| release codes returned by get_codes (default implementation is nop
void | release_ids (size_t list_no, const idx_t *ids) const override
| release ids returned by get_ids
idx_t | get_single_id (size_t list_no, size_t offset) const override
const uint8_t * | get_single_code (size_t list_no, size_t offset) const override
void | prefetch_lists (const idx_t *list_nos, int nlist) const override
Public Member Functions inherited from faiss::ReadOnlyInvertedLists
| ReadOnlyInvertedLists (size_t nlist, size_t code_size)
size_t | add_entries (size_t list_no, size_t n_entry, const idx_t *ids, const uint8_t *code) override
void | update_entries (size_t list_no, size_t offset, size_t n_entry, const idx_t *ids, const uint8_t *code) override
void | resize (size_t list_no, size_t new_size) override
Public Member Functions inherited from faiss::InvertedLists
| InvertedLists (size_t nlist, size_t code_size)
virtual size_t | add_entry (size_t list_no, idx_t theid, const uint8_t *code)
| add one entry to an inverted list
virtual void | update_entry (size_t list_no, size_t offset, idx_t id, const uint8_t *code)
virtual void | reset ()
void | merge_from (InvertedLists *oivf, size_t add_id)
| move all entries from oivf (empty on output)
double | imbalance_factor () const
| 1= perfectly balanced, >1: imbalanced
void | print_stats () const
| display some stats about the inverted lists
size_t | compute_ntotal () const
| sum up list sizes

## Public Attributes
const InvertedLists * | il
idx_t | i0
idx_t | i1
Public Attributes inherited from faiss::InvertedLists
size_t | nlist
| number of possible key values
size_t | code_size
| code size per vector in bytes

## Additional Inherited Members
Public Types inherited from faiss::InvertedLists
typedef Index::idx_t | idx_t

## Detailed Description

vertical slice of indexes in another InvertedLists

Definition at line 256 of file InvertedLists.h.

## Member Function Documentation

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

get the codes for an inverted list must be released by release_codes

Returns
  codes size list_size * code_size

Implements faiss::InvertedLists.

Definition at line 362 of file InvertedLists.cpp.

const Index::idx_t * faiss::SliceInvertedLists::get_ids | ( | size_t | list_no | ) | const
| override virtual

get the ids for an inverted list must be released by release_ids

Returns
  ids size list_size

Implements faiss::InvertedLists.

Definition at line 379 of file InvertedLists.cpp.

const uint8_t * faiss::SliceInvertedLists::get_single_code | ( | size_t | list_no,
|  | size_t | offset
| ) |  | const
| override virtual

Returns
  a single code in an inverted list (should be deallocated with release_codes)

Reimplemented from faiss::InvertedLists.

Definition at line 367 of file InvertedLists.cpp.

Index::idx_t faiss::SliceInvertedLists::get_single_id | ( | size_t | list_no,
|  | size_t | offset
| ) |  | const
| override virtual

Returns
  a single id in an inverted list

Reimplemented from faiss::InvertedLists.

Definition at line 384 of file InvertedLists.cpp.

void faiss::SliceInvertedLists::prefetch_lists | ( | const idx_t * | list_nos,
|  | int | nlist
| ) |  | const
| override virtual

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

Reimplemented from faiss::InvertedLists.

Definition at line 395 of file InvertedLists.cpp.

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

- /data/users/hoss/faiss/InvertedLists.h
- /data/users/hoss/faiss/InvertedLists.cpp