Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | List of all members
faiss::gpu::BinaryFlatIndex Class Reference

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

Public Member Functions

 BinaryFlatIndex (GpuResources *res, int dim, MemorySpace space)
 
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< unsigned char, 2, true > & getVectorsRef ()
 Returns a reference to our vectors currently in use.
 
void query (Tensor< unsigned char, 2, true > &vecs, int k, Tensor< int, 2, true > &outDistances, Tensor< int, 2, true > &outIndices)
 
void add (const unsigned char *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 20 of file BinaryFlatIndex.cuh.

Member Function Documentation

void faiss::gpu::BinaryFlatIndex::add ( const unsigned char *  data,
int  numVecs,
cudaStream_t  stream 
)

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

Definition at line 62 of file BinaryFlatIndex.cu.


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