pub unsafe extern "C" fn cuvsCagraIndexFromArgs(
res: cuvsResources_t,
metric: cuvsDistanceType,
graph: *mut DLManagedTensor,
dataset: *mut DLManagedTensor,
index: cuvsCagraIndex_t,
) -> cuvsError_tExpand description
Load index from a dataset and graph
@param[in] res cuvsResources_t opaque C handle @param[in] metric cuvsDistanceType to use in the index @param[in] graph the knn graph to use, shape (size, graph_degree) @param[in] dataset the dataset to use, shape (size, dim) @param[inout] index cuvsCagraIndex_t CAGRA index populated with the graph and dataset. This index needs to be already created with cuvsCagraIndexCreate.
@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 CAGRA index cuvsCagraIndex_t index; cuvsError_t index_create_status = cuvsCagraIndexCreate(&index);
// Assume a populated DLManagedTensor type here for the graph and dataset
DLManagedTensor dataset;
DLManagedTensor graph;
cuvsDistanceType metric = L2Expanded;
// Build the CAGRA Index from the graph/dataset cuvsError_t status = cuvsCagraIndexFromArgs(res, metric, &graph, &dataset, index);
@endcode