pub unsafe extern "C" fn M_copyTensorToDevice(
tensor: *mut M_AsyncTensor,
device: *mut M_Device,
status: *mut M_Status,
) -> *mut M_AsyncTensorExpand description
Copies a tensor to a different device.
Creates a copy of the tensor on the specified device.
@param tensor The tensor to copy. @param device The target device. @param status The status object for reporting errors.
@returns A pointer to the tensor on the target device. The caller owns the
returned memory and must deallocate it by calling M_freeTensor(). Returns
NULL if the operation fails, with an error message in the status.