Skip to main content

cudaMemcpyWithAttributesAsync

Function cudaMemcpyWithAttributesAsync 

Source
pub unsafe extern "C" fn cudaMemcpyWithAttributesAsync(
    dst: *mut c_void,
    src: *const c_void,
    size: size_t,
    attr: *mut cudaMemcpyAttributes,
    stream: cudaStream_t,
) -> cudaError_t
Expand description

Performs asynchronous memory copy operation with the specified attributes.

Performs asynchronous memory copy operation where dst and src are the destination and source pointers respectively. size specifies the number of bytes to copy. attr specifies the attributes for the copy and stream specifies the stream to enqueue the operation in.

For more information regarding the attributes, please refer to cudaMemcpyAttributes and it’s usage desciption in::cudaMemcpyBatchAsync.

Note that this function may also return error codes from previous, asynchronous launches.

Note: This function exhibits asynchronous behavior for most use cases.

Note: Memory regions requested must be either entirely registered with CUDA, or in the case of host pageable transfers, not registered at all. Memory regions spanning over allocations that are both registered and not registered with CUDA are not supported and will return CUDA_ERROR_INVALID_VALUE.

§Parameters

  • dst: Destination device pointer.
  • src: Source device pointer.
  • size: Number of bytes to copy.
  • attr: Attributes for the copy.
  • stream: Stream to enqueue the operation in.

§Return value

See also: cudaMemcpyBatchAsync.