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 131See also:cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost,cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D,cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpy-DtoA, cuMemcpyDtoD, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync,cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGet-Info, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32,cuMemsetD8, cuMemsetD16, cuMemsetD323.25.2.2 CUresult cuArray3DGetDescriptor (<strong>CUDA</strong>_ARRAY3D_DESCRIPTOR ∗ pDesc, CUarray hArray)Returns in ∗pDesc a descriptor containing information on the format and dimensions of the <strong>CUDA</strong> array hArray.It is useful for subroutines that have been passed a <strong>CUDA</strong> array, but need to know the <strong>CUDA</strong> array parameters forvalidation or other purposes.This function may be called on 1D and 2D arrays, in which case the Height and/or Depth members of the descriptorstruct will be set to 0.Parameters:pDesc - Returned 3D array descriptorhArray - 3D array to get descriptor ofReturns: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_VALUE, <strong>CUDA</strong>_ERROR_INVALID_HANDLESee also:Note that this function may also return error codes from previous, asynchronous launches.cuArray3DCreate, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost,cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync,cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA,cuMemcpyDtoD, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync,cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGet-Info, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32,cuMemsetD8, cuMemsetD16, cuMemsetD323.25.2.3 CUresult cuArrayCreate (CUarray ∗ pHandle, const <strong>CUDA</strong>_ARRAY_DESCRIPTOR ∗ pDesc)Creates a <strong>CUDA</strong> array according to the <strong>CUDA</strong>_ARRAY_DESCRIPTOR structure pDesc and returns a handle to thenew <strong>CUDA</strong> array in ∗pHandle. The <strong>CUDA</strong>_ARRAY_DESCRIPTOR is defined as:typedef struct {unsigned int Width;unsigned int Height;CUarray_format Format;unsigned int NumChannels;} <strong>CUDA</strong>_ARRAY_DESCRIPTOR;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!