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.

186 Module Documentation3.29.2 Function Documentation3.29.2.1 CUresult cuD3D10CtxCreate (CUcontext ∗ pCtx, CUdevice ∗ pCuDevice, unsigned int Flags,ID3D10Device ∗ pDxDevice)Creates a new <strong>CUDA</strong> context, enables interoperability for that context with the Direct3D device pDxDevice, and associatesthe created <strong>CUDA</strong> context with the calling thread. The CUcontext will be returned in ∗pCtx. If pCuDeviceis non-NULL, then the CUdevice on which this <strong>CUDA</strong> context was created will be returned in ∗pCuDevice. Forusage of the Flags parameter, see cuCtxCreate(). Direct3D resources from this device may be registered and mappedthrough the lifetime of this <strong>CUDA</strong> context.This context will function only until its Direct3D device is destroyed. On success, this call will increase the internalreference count on pDxDevice. This reference count will be decremented upon destruction of this context throughcuCtxDestroy().Parameters:pCtx - Returned newly created <strong>CUDA</strong> contextpCuDevice - Returned pointer to device on which context was createdFlags - Context creation flags (see cuCtxCreate() for details)pDxDevice - Direct3D device to create interoperability context withReturns:Note:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_VALUE, <strong>CUDA</strong>_ERROR_OUT_OF_MEMORY, <strong>CUDA</strong>_ERROR_UNKNOWNSee also:Note that this function may also return error codes from previous, asynchronous launches.cuD3D10GetDevice, cuD3D10MapResources, cuD3D10RegisterResource, cuD3D10ResourceGetMappedArray,cuD3D10ResourceGetMappedPitch, cuD3D10ResourceGetMappedPointer, cuD3D10ResourceGetMappedSize,cuD3D10ResourceGetSurfaceDimensions, cuD3D10ResourceSetMapFlags, cuD3D10UnmapResources,cuD3D10UnregisterResource3.29.2.2 CUresult cuD3D10GetDevice (CUdevice ∗ pDevice, IDXGIAdapter ∗ pAdapter)Returns in ∗pDevice the Cuda-compatible device corresponding to the adapter pAdapter obtained from IDXGI-Factory::EnumAdapters. This call will succeed only if a device on adapter pAdapter is Cuda-compatible.Parameters:pDevice - Returns the device corresponding to pAdapterpAdapter - D3D10 adapter to get device forReturns:Note:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_VALUE, <strong>CUDA</strong>_ERROR_UNKNOWNNote 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!