XVector
xvec::IvfRaBitQIndex Class Reference

RAII wrapper for xvecIvfRaBitQIndexTag. More...

#include <xvec_ivf_rabitq_index.hpp>

Public Member Functions

virtual ~IvfRaBitQIndex ()
 
 IvfRaBitQIndex (IvfRaBitQIndex &&other) noexcept
 
IvfRaBitQIndex & operator= (IvfRaBitQIndex &&other) noexcept
 
 IvfRaBitQIndex (const IvfRaBitQIndex &)=delete
 
IvfRaBitQIndex & operator= (const IvfRaBitQIndex &)=delete
 
xvecIvfRaBitQIndexTag * handle () const noexcept
 Get the underlying C API handle. More...
 

Static Public Member Functions

static IvfRaBitQIndex fromFaissFile (xvecExecutionContextTag *context, const std::string &path)
 Load an IVF-RaBitQ index from a Faiss file. More...
 
static IvfRaBitQIndex fromDescriptor (xvecExecutionContextTag *context, const xvecIvfRaBitQDescriptor &descriptor)
 Load an IVF-RaBitQ index from a FAISS-free descriptor. More...
 

Detailed Description

RAII wrapper for xvecIvfRaBitQIndexTag.

Manages the lifetime of an IVF-RaBitQ index. The index is loaded via named factory methods and destroyed in the destructor. Supports move semantics but not copying.

Note
Destroy this wrapper before its execution context. Index device memory remains allocated until context destruction; see Index resource lifetime.

Definition at line 58 of file xvec_ivf_rabitq_index.hpp.

Constructor & Destructor Documentation

◆ ~IvfRaBitQIndex()

virtual xvec::IvfRaBitQIndex::~IvfRaBitQIndex ( )
virtual

◆ IvfRaBitQIndex() [1/2]

xvec::IvfRaBitQIndex::IvfRaBitQIndex ( IvfRaBitQIndex &&  other)
noexcept

◆ IvfRaBitQIndex() [2/2]

xvec::IvfRaBitQIndex::IvfRaBitQIndex ( const IvfRaBitQIndex &  )
delete

Member Function Documentation

◆ fromDescriptor()

static IvfRaBitQIndex xvec::IvfRaBitQIndex::fromDescriptor ( xvecExecutionContextTag *  context,
const xvecIvfRaBitQDescriptor &  descriptor 
)
static

Load an IVF-RaBitQ index from a FAISS-free descriptor.

Parameters
contextExecution context handle (not owned).
descriptorFully-populated index descriptor (borrowed for the call).
Exceptions
xvec::Errorif loading fails.
See also
xvecIvfRaBitQDescriptor

◆ fromFaissFile()

static IvfRaBitQIndex xvec::IvfRaBitQIndex::fromFaissFile ( xvecExecutionContextTag *  context,
const std::string &  path 
)
static

Load an IVF-RaBitQ index from a Faiss file.

Parameters
contextExecution context handle (not owned).
pathPath to the Faiss index file (.faiss).
Exceptions
xvec::Errorif loading fails.

◆ handle()

xvecIvfRaBitQIndexTag* xvec::IvfRaBitQIndex::handle ( ) const
noexcept

Get the underlying C API handle.

◆ operator=() [1/2]

IvfRaBitQIndex& xvec::IvfRaBitQIndex::operator= ( const IvfRaBitQIndex &  )
delete

◆ operator=() [2/2]

IvfRaBitQIndex& xvec::IvfRaBitQIndex::operator= ( IvfRaBitQIndex &&  other)
noexcept

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