12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

144 Module DocumentationIf dstMemoryType is CU_MEMORYTYPE_ARRAY, dstArray specifies the handle of the destination data.dstHost, dstDevice, dstPitch and dstHeight are ignored.• srcXInBytes, srcY and srcZ specify the base address of the source data for the copy.For host pointers, the starting address isvoid* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes);For device pointers, the starting address isCUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes;For <strong>CUDA</strong> arrays, srcXInBytes must be evenly divisible by the array element size.• dstXInBytes, dstY and dstZ specify the base address of the destination data for the copy.For host pointers, the base address isvoid* dstStart = (void*)((char*)dstHost+(dstZ*dstHeight+dstY)*dstPitch + dstXInBytes);For device pointers, the starting address isCUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes;For <strong>CUDA</strong> arrays, dstXInBytes must be evenly divisible by the array element size.• WidthInBytes, Height and Depth specify the width (in bytes), height and depth of the 3D copy being performed.Any pitches must be greater than or equal to WidthInBytes.cuMemcpy3D() returns an error if any pitch is greater than the maximum allowed (CU_DEVICE_ATTRIBUTE_-MAX_PITCH).The srcLOD and dstLOD members of the <strong>CUDA</strong>_MEMCPY3D structure must be set to 0.Parameters:pCopy - Parameters for the memory copyReturns: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_VALUENote that this function may also return error codes from previous, asynchronous launches.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!