Skip to main content

cuvsCagraIndexGetDataset

Function cuvsCagraIndexGetDataset 

Source
pub unsafe extern "C" fn cuvsCagraIndexGetDataset(
    index: cuvsCagraIndex_t,
    dataset: *mut DLManagedTensor,
) -> cuvsError_t
Expand description

@brief Returns a view of the CAGRA dataset

This function returns a non-owning view of the CAGRA dataset. The output will be referencing device memory that is directly used in CAGRA, without copying the dataset at all. This means that the output is only valid as long as the CAGRA index is alive, and once cuvsCagraIndexDestroy is called on the cagra index - the returned dataset view will be invalid.

Note that the DLManagedTensor dataset returned will have an associated ‘deleter’ function that must be called when the dataset is no longer needed. This will free up host memory that stores the shape of the dataset view.

@param[in] index CAGRA index @param[out] dataset the dataset used in cagra @return cuvsError_t