12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

42 Module Documentation3.8.2.24 cudaError_t cudaMemcpyArrayToArray (struct cudaArray ∗ dst, size_t wOffsetDst, size_thOffsetDst, const struct cudaArray ∗ src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, enumcudaMemcpyKind kind)Copies count bytes from the <strong>CUDA</strong> array src starting at the upper left corner (wOffsetSrc, hOffsetSrc)to the <strong>CUDA</strong> array dst starting at the upper left corner (wOffsetDst, hOffsetDst) where kind is one of cudaMemcpyHostToHost,cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, or cudaMemcpyDeviceToDevice,and specifies the direction of the copy.Parameters:dst - Destination memory addresswOffsetDst - Destination starting X offsethOffsetDst - Destination starting Y offsetsrc - Source memory addresswOffsetSrc - Source starting X offsethOffsetSrc - Source starting Y offsetcount - Size in bytes to copykind - Type of transferReturns:Note:See also:cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidMemcpyDirectionNote that this function may also return error codes from previous, asynchronous launches.cudaMemcpy, cudaMemcpy2D, cudaMemcpyToArray, cudaMemcpy2DToArray, cudaMemcpyFromArray,cudaMemcpy2DFromArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol,cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync,cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync3.8.2.25 cudaError_t cudaMemcpyAsync (void ∗ dst, const void ∗ src, size_t count, enum cudaMemcpyKindkind, cudaStream_t stream)Copies count bytes from the memory area pointed to by src to the memory area pointed to by dst, where kind isone of cudaMemcpyHostToHost, cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, or cudaMemcpyDevice-ToDevice, and specifies the direction of the copy. The memory areas may not overlap. Calling cudaMemcpyAsync()with dst and src pointers that do not match the direction of the copy results in an undefined behavior.cudaMemcpyAsync() is asynchronous with respect to the host, so the call may return before the copy is complete. Itonly works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. Thecopy can optionally be associated to a stream by passing a non-zero stream argument. If kind is cudaMemcpy-HostToDevice or cudaMemcpyDeviceToHost and the stream is non-zero, the copy may overlap with operations inother streams.IMPORTANT NOTE: Copies with kind == cudaMemcpyDeviceToDevice are asynchronous with respect to thehost, but never overlap with kernel execution.Generated on Wed Apr 1 16:11:42 2009 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!