Function rcudnn_sys::cudaMemcpy2DToArrayAsync[][src]

pub unsafe extern "C" fn cudaMemcpy2DToArrayAsync(
    dst: cudaArray_t,
    wOffset: usize,
    hOffset: usize,
    src: *const c_void,
    spitch: usize,
    width: usize,
    height: usize,
    kind: cudaMemcpyKind,
    stream: cudaStream_t
) -> cudaError_t
Expand description

\brief Copies data between host and device

Copies a matrix (\p height rows of \p width bytes each) from the memory area pointed to by \p src to the CUDA array \p dst starting at \p hOffset rows and \p wOffset bytes from the upper left corner, where \p kind specifies the direction of the copy, and must be one of ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer is inferred from the pointer values. However, ::cudaMemcpyDefault is only allowed on systems that support unified virtual addressing. \p spitch is the width in memory in bytes of the 2D array pointed to by \p src, including any padding added to the end of each row. \p wOffset + \p width must not exceed the width of the CUDA array \p dst. \p width must not exceed \p spitch. ::cudaMemcpy2DToArrayAsync() returns an error if \p spitch exceeds the maximum allowed.

::cudaMemcpy2DToArrayAsync() is asynchronous with respect to the host, so the call may return before the copy is complete. The copy can optionally be associated to a stream by passing a non-zero \p stream argument. If \p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \p stream is non-zero, the copy may overlap with operations in other streams.

\param dst - Destination memory address \param wOffset - Destination starting X offset (columns in bytes) \param hOffset - Destination starting Y offset (rows) \param src - Source memory address \param spitch - Pitch of source memory \param width - Width of matrix transfer (columns in bytes) \param height - Height of matrix transfer (rows) \param kind - Type of transfer \param stream - Stream identifier

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorInvalidPitchValue, ::cudaErrorInvalidMemcpyDirection \notefnerr \note_async \note_null_stream \note_init_rt \note_callback \note_memcpy

\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,

::cudaMemcpy2DFromArrayAsync, ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, ::cuMemcpy2DAsync