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.

3.25 Memory Management 1533.25.2.23 CUresult cuMemcpyHtoAAsync (CUarray hDst, unsigned int dstOffset, const void ∗ pSrc,unsigned int bytes, CUstream hStream)Copies from host memory to a 1D <strong>CUDA</strong> array. hDst and dstOffset specify the <strong>CUDA</strong> array handle and startingindex of the destination data. pSrc specifies the base address of the source. bytes specifies the number of bytes tocopy.cuMemcpyHtoAAsync() is asynchronous and can optionally be associated to a stream by passing a non-zerohStream argument. It only works on page-locked memory and returns an error if a pointer to pageable memoryis passed as input.Parameters:hDst - Destination arraydstOffset - Offset of destination arraypSrc - Source host pointerbytes - Size of memory copy in byteshStream - Stream identifierReturns:Note:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUESee also:Note that this function may also return error codes from previous, asynchronous launches.cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc,cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned,cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAto-HAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA,cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGet-Info, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32,cuMemsetD8, cuMemsetD16, cuMemsetD323.25.2.24 CUresult cuMemcpyHtoD (CUdeviceptr dptr, const void ∗ src, unsigned int bytes)Copies from host memory to device memory. dst and src are the base addresses of the destination and source,respectively. bytes specifies the number of bytes to copy. Note that this function is synchronous.Parameters:dptr - Destination device pointersrc - Source host pointerbytes - Size of memory copy in bytesReturns:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUEGenerated 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!