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 | Static Public Member Functions | Static Public Attributes | List of all members
faiss::InterruptCallback Struct Referenceabstract

## Public Member Functions
virtual bool | want_interrupt ()=0

## Static Public Member Functions
static void | check ()
static bool | is_interrupted ()
static size_t | get_period_hint (size_t flops)

## Static Public Attributes
static std::unique_ptr < InterruptCallback > | instance

## Detailed Description

Definition at line 250 of file AuxIndexStructures.h.

## Member Function Documentation

void faiss::InterruptCallback::check | ( |  | ) |
| static

check if:

- an interrupt callback is set
- the callback retuns true if this is the case, then throw an exception

Definition at line 307 of file AuxIndexStructures.cpp.

size_t faiss::InterruptCallback::get_period_hint | ( | size_t | flops | ) |
| static

assuming each iteration takes a certain number of flops, what is a reasonable interval to check for interrupts?

Definition at line 324 of file AuxIndexStructures.cpp.

bool faiss::InterruptCallback::is_interrupted | ( |  | ) |
| static

same as check() but return true if is interrupted instead of throwing

Definition at line 316 of file AuxIndexStructures.cpp.

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

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