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 | List of all members
faiss::gpu::FlatIndex Class Reference

Holder of GPU resources for a particular flat index. More...

## Public Member Functions
| FlatIndex (GpuResources *res, int dim, bool l2Distance, bool useFloat16, bool useFloat16Accumulator, bool storeTransposed, MemorySpace space)
bool | getUseFloat16 () const
int | getSize () const
| Returns the number of vectors we contain.
int | getDim () const
void | reserve (size_t numVecs, cudaStream_t stream)
| Reserve storage that can contain at least this many vectors.
Tensor< float, 2, true > & | getVectorsFloat32Ref ()
| Returns a reference to our vectors currently in use.
DeviceTensor< float, 2, true > | getVectorsFloat32Copy (cudaStream_t stream)
DeviceTensor< float, 2, true > | getVectorsFloat32Copy (int from, int num, cudaStream_t stream)
| Returns only a subset of the vectors.
void | query (Tensor< float, 2, true > &vecs, int k, Tensor< float, 2, true > &outDistances, Tensor< int, 2, true > &outIndices, bool exactDistance)
void | add (const float *data, int numVecs, cudaStream_t stream)
void | reset ()
| Free all storage.

## Detailed Description

Holder of GPU resources for a particular flat index.

Definition at line 23 of file FlatIndex.cuh.

## Member Function Documentation

void faiss::gpu::FlatIndex::add | ( | const float * | data,
|  | int | numVecs,
|  | cudaStream_t | stream
| ) |  |

Add vectors to ourselves; the pointer passed can be on the host or the device

Definition at line 195 of file FlatIndex.cu.

DeviceTensor< float, 2, true > faiss::gpu::FlatIndex::getVectorsFloat32Copy | ( | cudaStream_t | stream | ) |

Performs a copy of the vectors on the given device, converting as needed from float16

Definition at line 91 of file FlatIndex.cu.

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

- /data/users/matthijs/github_faiss/faiss/gpu/impl/FlatIndex.cuh
- /data/users/matthijs/github_faiss/faiss/gpu/impl/FlatIndex.cu