HNSW#

This is a wrapper for hnswlib, to load a CAGRA index as an immutable HNSW index. The loaded HNSW index is only compatible in cuVS, and can be searched using wrapper functions.

#include <raft/neighbors/hnsw.h>

Index search parameters#

typedef struct cuvsHnswSearchParams *cuvsHnswSearchParams_t#
cuvsError_t cuvsHnswSearchParamsCreate(cuvsHnswSearchParams_t *params)#

Allocate HNSW search params, and populate with default values.

Parameters:

params[in] cuvsHnswSearchParams_t to allocate

Returns:

cuvsError_t

cuvsError_t cuvsHnswSearchParamsDestroy(cuvsHnswSearchParams_t params)#

De-allocate HNSW search params.

Parameters:

params[in] cuvsHnswSearchParams_t to de-allocate

Returns:

cuvsError_t

struct cuvsHnswSearchParams#
#include <hnsw.h>

Index#

typedef cuvsHnswIndex *cuvsHnswIndex_t#
cuvsError_t cuvsHnswIndexCreate(cuvsHnswIndex_t *index)#

Allocate HNSW index.

Parameters:

index[in] cuvsHnswIndex_t to allocate

Returns:

HnswError_t

cuvsError_t cuvsHnswIndexDestroy(cuvsHnswIndex_t index)#

De-allocate HNSW index.

Parameters:

index[in] cuvsHnswIndex_t to de-allocate

struct cuvsHnswIndex#
#include <hnsw.h>

Struct to hold address of cuvs::neighbors::Hnsw::index and its active trained dtype.

Index serialize#

Warning

doxygengroup: Cannot find group “hnsw_c_index_serialize” in doxygen xml output for project “cuvs” from directory: ../../cpp/doxygen/_xml/