pub unsafe extern "C" fn cuvsAllNeighborsBuild(
res: cuvsResources_t,
params: cuvsAllNeighborsIndexParams_t,
dataset: *mut DLManagedTensor,
indices: *mut DLManagedTensor,
distances: *mut DLManagedTensor,
core_distances: *mut DLManagedTensor,
alpha: f32,
) -> cuvsError_tExpand description
@brief Build an all-neighbors k-NN graph automatically detecting host vs device dataset.
@param[in] res Can be a SNMG multi-GPU resources (cuvsResources_t) or single-GPU
resources
@param[in] params Build parameters (see cuvsAllNeighborsIndexParams)
@param[in] dataset 2D tensor [num_rows x dim] on host or device (auto-detected)
@param[out] indices 2D tensor [num_rows x k] on device (int64)
@param[out] distances Optional 2D tensor [num_rows x k] on device (float32); can be NULL
@param[out] core_distances Optional 1D tensor [num_rows] on device (float32); can be NULL
@param[in] alpha Mutual-reachability scaling; used only when core_distances is provided
The function automatically detects whether the dataset is host-resident or device-resident
and calls the appropriate implementation. For host datasets, it partitions data into
n_clusters clusters and assigns each row to overlap_factor nearest clusters. For device
datasets, n_clusters must be 1 (no batching); overlap_factor is ignored.
Outputs always reside in device memory.