11.01.2014 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

48 Module Documentation<br />

kind - Type of transfer<br />

Returns:<br />

Note:<br />

See also:<br />

cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidMemcpyDirection<br />

Note that this function may also return error codes from previous, asynchronous launches.<br />

cudaMemcpy, cudaMemcpy2D, cudaMemcpyToArray, cudaMemcpy2DToArray, cudaMemcpyFromArray,<br />

cudaMemcpy2DFromArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol,<br />

cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync,<br />

cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync<br />

4.8.2.26 cudaError_t cudaMemcpyAsync (void ∗ dst, const void ∗ src, size_t count, enum cudaMemcpyKind<br />

kind, cudaStream_t stream)<br />

Copies count bytes from the memory area pointed to by src to the memory area pointed to by dst, where kind is<br />

one of cudaMemcpyHostToHost, cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, or cudaMemcpyDevice-<br />

ToDevice, and specifies the direction of the copy. The memory areas may not overlap. Calling cudaMemcpyAsync()<br />

with dst and src pointers that do not match the direction of the copy results in an undefined behavior.<br />

cudaMemcpyAsync() is asynchronous with respect to the host, so the call may return before the copy is complete. It<br />

only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. The<br />

copy can optionally be associated to a stream by passing a non-zero stream argument. If kind is cudaMemcpy-<br />

HostToDevice or cudaMemcpyDeviceToHost and the stream is non-zero, the copy may overlap with operations in<br />

other streams.<br />

IMPORTANT NOTE: Copies with kind == cudaMemcpyDeviceToDevice are asynchronous with respect to the<br />

host, but never overlap with kernel execution.<br />

Parameters:<br />

dst - Destination memory address<br />

src - Source memory address<br />

count - Size in bytes to copy<br />

kind - Type of transfer<br />

stream - Stream identifier<br />

Returns:<br />

Note:<br />

See also:<br />

cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevicePointer, cudaErrorInvalidMemcpyDirection<br />

Note that this function may also return error codes from previous, asynchronous launches.<br />

cudaMemcpy, cudaMemcpy2D, cudaMemcpyToArray, cudaMemcpy2DToArray, cudaMemcpyFromArray,<br />

cudaMemcpy2DFromArray, cudaMemcpyArrayToArray, cudaMemcpy2DArrayToArray, cudaMemcpy-<br />

ToSymbol, cudaMemcpyFromSymbol, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync,<br />

cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync,<br />

cudaMemcpyFromSymbolAsync<br />

Generated for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!