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.

3.25 Memory Management 1433.25.2.12 CUresult cuMemcpy3D (const <strong>CUDA</strong>_MEMCPY3D ∗ pCopy)Perform a 3D memory copy according to the parameters specified in pCopy. The <strong>CUDA</strong>_MEMCPY3D structure isdefined as:typedef struct <strong>CUDA</strong>_MEMCPY3D_st {unsigned int srcXInBytes, srcY, srcZ;unsigned int srcLOD;CUmemorytype srcMemoryType;const void *srcHost;CUdeviceptr srcDevice;CUarray srcArray;unsigned int srcPitch; // ignored when src is arrayunsigned int srcHeight; // ignored when src is array; may be 0 if Depth==1unsigned int dstXInBytes, dstY, dstZ;unsigned int dstLOD;CUmemorytype dstMemoryType;void *dstHost;CUdeviceptr dstDevice;CUarray dstArray;unsigned int dstPitch; // ignored when dst is arrayunsigned int dstHeight; // ignored when dst is array; may be 0 if Depth==1unsigned int WidthInBytes;unsigned int Height;unsigned int Depth;} <strong>CUDA</strong>_MEMCPY3D;where:• srcMemoryType and dstMemoryType specify the type of memory of the source and destination, respectively;CUmemorytype_enum is defined as:typedef enum CUmemorytype_enum {CU_MEMORYTYPE_HOST = 0x01,CU_MEMORYTYPE_DEVICE = 0x02,CU_MEMORYTYPE_ARRAY = 0x03} CUmemorytype;If srcMemoryType is CU_MEMORYTYPE_HOST, srcHost, srcPitch and srcHeight specify the (host) base addressof the source data, the bytes per row, and the height of each 2D slice of the 3D array. srcArray is ignored.If srcMemoryType is CU_MEMORYTYPE_DEVICE, srcDevice, srcPitch and srcHeight specify the (device)base address of the source data, the bytes per row, and the height of each 2D slice of the 3D array. srcArray isignored.If srcMemoryType is CU_MEMORYTYPE_ARRAY, srcArray specifies the handle of the source data. srcHost,srcDevice, srcPitch and srcHeight are ignored.If dstMemoryType is CU_MEMORYTYPE_HOST, dstHost and dstPitch specify the (host) base address of thedestination data, the bytes per row, and the height of each 2D slice of the 3D array. dstArray is ignored.If dstMemoryType is CU_MEMORYTYPE_DEVICE, dstDevice and dstPitch specify the (device) base addressof the destination data, the bytes per row, and the height of each 2D slice of the 3D array. dstArray is ignored.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!