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 129• CUresult cuMemsetD16 (CUdeviceptr dstDevice, unsigned short us, unsigned int N)Initializes device memory.• CUresult cuMemsetD2D16 (CUdeviceptr dstDevice, unsigned int dstPitch, unsigned short us, unsigned intWidth, unsigned int Height)Initializes device memory.• CUresult cuMemsetD2D32 (CUdeviceptr dstDevice, unsigned int dstPitch, unsigned int ui, unsigned int Width,unsigned int Height)Initializes device memory.• CUresult cuMemsetD2D8 (CUdeviceptr dstDevice, unsigned int dstPitch, unsigned char uc, unsigned int Width,unsigned int Height)Initializes device memory.• CUresult cuMemsetD32 (CUdeviceptr dstDevice, unsigned int ui, unsigned int N)Initializes device memory.• CUresult cuMemsetD8 (CUdeviceptr dstDevice, unsigned char c, unsigned int N)Initializes device memory.3.25.1 Detailed DescriptionThis section describes the memory management functions of the low-level <strong>CUDA</strong> driver application programminginterface.3.25.2 Function Documentation3.25.2.1 CUresult cuArray3DCreate (CUarray ∗ pHandle, const <strong>CUDA</strong>_ARRAY3D_DESCRIPTOR ∗pDesc)Creates a <strong>CUDA</strong> array according to the <strong>CUDA</strong>_ARRAY3D_DESCRIPTOR structure pDesc and returns a handle tothe new <strong>CUDA</strong> array in ∗pHandle. The <strong>CUDA</strong>_ARRAY3D_DESCRIPTOR is defined as:typedef struct {unsigned int Width;unsigned int Height;unsigned int Depth;CUarray_format Format;unsigned int NumChannels;unsigned int Flags;} <strong>CUDA</strong>_ARRAY3D_DESCRIPTOR;where:• Width, Height, and Depth are the width, height, and depth of the <strong>CUDA</strong> array (in elements); the <strong>CUDA</strong>array is one-dimensional if height and depth are 0, two-dimensional if depth is 0, and three-dimensional otherwise;• Format specifies the format of the elements; CUarray_format is defined as: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!