Skip to main content

cuvsMatrixCopy

Function cuvsMatrixCopy 

Source
pub unsafe extern "C" fn cuvsMatrixCopy(
    res: cuvsResources_t,
    src: *mut DLManagedTensor,
    dst: *mut DLManagedTensor,
) -> cuvsError_t
Expand description

@brief Copy a matrix

This function copies a matrix from dst to src. This lets you copy a matrix from device memory to host memory (or vice versa), while accounting for differences in strides.

Both src and dst must have the same shape and dtype, but can have different strides and device type. The memory for the output dst tensor must already be allocated and the tensor initialized.

@param[in] res cuvsResources_t opaque C handle @param[in] src Pointer to DLManagedTensor to copy @param[out] dst Pointer to DLManagedTensor to receive copy of data