Skip to main content

cuvsCagraSerializeToHnswlib

Function cuvsCagraSerializeToHnswlib 

Source
pub unsafe extern "C" fn cuvsCagraSerializeToHnswlib(
    res: cuvsResources_t,
    filename: *const c_char,
    index: cuvsCagraIndex_t,
) -> cuvsError_t
Expand description

Save the CAGRA index to file in hnswlib format. NOTE: The saved index can only be read by the hnswlib wrapper in cuVS, as the serialization format is not compatible with the original hnswlib.

Experimental, both the API and the serialization format are subject to change.

@code{.c} #include <cuvs/core/c_api.h> #include <cuvs/neighbors/cagra.h>

// Create cuvsResources_t cuvsResources_t res; cuvsError_t res_create_status = cuvsResourcesCreate(&res);

// create an index with cuvsCagraBuild cuvsCagraSerializeHnswlib(res, “/path/to/index”, index); @endcode

@param[in] res cuvsResources_t opaque C handle @param[in] filename the file name for saving the index @param[in] index CAGRA index