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.

3.28 Direct3D 9 Interoperability 1753.28.1 Detailed DescriptionThis section describes the Direct3D 9 interoperability functions of the low-level <strong>CUDA</strong> driver application programminginterface.3.28.2 Function Documentation3.28.2.1 CUresult cuD3D9CtxCreate (CUcontext ∗ pCtx, CUdevice ∗ pCuDevice, unsigned int flags,IDirect3DDevice9 ∗ 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.cuD3D9GetDevice, cuD3D9GetDirect3DDevice, cuD3D9MapResources, cuD3D9RegisterResource,cuD3D9ResourceGetMappedArray, cuD3D9ResourceGetMappedPitch, cuD3D9ResourceGetMappedPointer,cuD3D9ResourceGetMappedSize, cuD3D9ResourceGetSurfaceDimensions, cuD3D9ResourceSetMapFlags,cuD3D9UnmapResources, cuD3D9UnregisterResource3.28.2.2 CUresult cuD3D9GetDevice (CUdevice ∗ pDevice, const char ∗ pszAdapterName)Returns in ∗pDevice the <strong>CUDA</strong>-compatible device corresponding to the adapter name pszAdapterName obtainedfrom EnumDisplayDevices() or IDirect3D9::GetAdapterIdentifier(). If no device on the adapter with namepszAdapterName is <strong>CUDA</strong>-compatible, then the call will fail.Parameters:pDevice - Returned <strong>CUDA</strong> device corresponding to pszAdapterNamepszAdapterName - Adapter name to query for deviceGenerated 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!