Function rcudnn::cudaMemcpy[][src]

pub unsafe extern "C" fn cudaMemcpy(
    dst: *mut c_void,
    src: *const c_void,
    count: usize,
    kind: cudaMemcpyKind
) -> cudaError
Expand description

\brief Copies data between host and device

Copies \p count bytes from the memory area pointed to by \p src to the memory area pointed to by \p dst, 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. Calling ::cudaMemcpy() with dst and src pointers that do not match the direction of the copy results in an undefined behavior.

\param dst - Destination memory address \param src - Source memory address \param count - Size in bytes to copy \param kind - Type of transfer

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorInvalidMemcpyDirection \notefnerr \note_init_rt \note_callback

\note_sync \note_memcpy

\sa ::cudaMemcpy2D, ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, ::cudaMemcpy2DToArrayAsync, ::cudaMemcpy2DFromArrayAsync, ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, ::cuMemcpyDtoH, ::cuMemcpyHtoD, ::cuMemcpyDtoD, ::cuMemcpy