62 xvecHnswFlatIndexTag* indexHandle,
64 xvecBufferTag* resultsBufferHandle,
105 const char* indexFilePath,
106 xvecHnswFlatIndexTag** outIndexHandle);
156 xvecHnswFlatIndexTag** outIndexHandle);
172 xvecHnswFlatIndexTag* indexHandle);
FAISS-free description of an HNSW-Flat index.
const uint64_t * neighborOffsets
Per-node start offset into neighbors [numVectors + 1].
uint32_t M
Max neighbors per node at levels >= 1.
uint32_t maxLevel
Highest level in the hierarchy.
xvecVectorIdType numVectors
Total number of graph nodes / vectors.
const uint32_t * nodeLevels
Top level (0-based) of each node [numVectors].
const xvecVectorIdType * neighbors
Flat neighbor ids; per node level 0 (M0 slots) then each higher level (M slots); empty slots are -1.
xvecDistanceType distanceType
Distance metric the graph was built under.
uint32_t M0
Max neighbors per node at level 0 (usually 2*M).
const xvecFloat32 * vectors
Vectors, row-major by node id [numVectors * dimension].
xvecVectorIdType entryPointId
Graph entry-point node id; must be < numVectors.
xvecDimensionType dimension
Dimension of each vector (d).
Search query parameters for HNSW-Flat index search.
struct xvecHnswFlatSearchTiming xvecHnswFlatSearchTiming
xvecStatus xvecHnswFlatPrepareKernel(xvecExecutionContextTag *context)
Warm-starts the HNSW-Flat search kernels on a context (optional).
xvecStatus xvecHnswFlatLoadIndexFromDescriptor(xvecExecutionContextTag *context, const xvecHnswFlatDescriptor *descriptor, xvecHnswFlatIndexTag **outIndexHandle)
Loads an HNSW-Flat index from a FAISS-free descriptor and uploads it to the device.
struct xvecHnswFlatDescriptor xvecHnswFlatDescriptor
FAISS-free description of an HNSW-Flat index.
xvecStatus xvecHnswFlatLoadIndexFromFaissFile(xvecExecutionContextTag *context, const char *indexFilePath, xvecHnswFlatIndexTag **outIndexHandle)
Loads an HNSW-Flat index from a Faiss index file and uploads it to the device.
xvecStatus xvecHnswFlatSearch(xvecExecutionContextTag *context, xvecHnswFlatIndexTag *indexHandle, xvecHnswFlatSearchQueryFloat32 *searchQuery, xvecBufferTag *resultsBufferHandle, xvecHnswFlatSearchTiming *outTiming)
Performs an HNSW-Flat search.
xvecStatus xvecHnswFlatDestroyIndex(xvecExecutionContextTag *context, xvecHnswFlatIndexTag *indexHandle)
Destroys an HNSW-Flat index handle and releases its host-side data.
Core types, enums, and structures for the XVector library.
uint32_t xvecDimensionType
Type for vector dimension.
xvecStatus
Status codes returned by XVector API functions.
xvecDistanceType
Distance/similarity metrics for vector search.
float xvecFloat32
32-bit floating point type for vector components.
uint64_t xvecVectorIdType
Type for vector identifiers.