cuD3D9CtxCreate ( CUcontext pCtx,
CUdevice pCuDevice,
unsigned int  Flags,
IDirect3DDevice9 *  pDxDevice 
)

Creates a new CUDA context, enables interoperability for that context with the Direct3D device pDxDevice, and associates the created CUDA context with the calling thread. The CUcontext will be returned in *pCtx. If pCuDevice is non-NULL, then the CUdevice on which this CUDA context was created will be returned in *pCuDevice. For usage of the Flags parameter, see cuCtxCreate(). Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.

This context will function only until its Direct3D device is destroyed. On success, this call will increase the internal reference count on pDxDevice. This reference count will be decremented upon destruction of this context through cuCtxDestroy().

Parameters:
pCtx - Returned newly created CUDA context
pCuDevice - Returned pointer to device on which context was created
Flags - Context creation flags (see cuCtxCreate() for details)
pDxDevice - Direct3D device to create interoperability context with
Returns:
CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_UNKNOWN
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cuD3D9GetDevice, cuD3D9GetDirect3DDevice, cuD3D9MapResources, cuD3D9RegisterResource, cuD3D9ResourceGetMappedArray, cuD3D9ResourceGetMappedPitch, cuD3D9ResourceGetMappedPointer, cuD3D9ResourceGetMappedSize, cuD3D9ResourceGetSurfaceDimensions, cuD3D9ResourceSetMapFlags, cuD3D9UnmapResources, cuD3D9UnregisterResource


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA