cudaError_t cudaD3D9SetDirect3DDevice ( IDirect3DDevice9 *  pD3D9Device,
int  device = -1 
)

Records pD3D9Device as the Direct3D device to use for Direct3D interoperability on this host thread. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread, then this call returns cudaErrorSetOnActiveProcess.

Successful context creation on pD3D9Device will increase the internal reference count on pD3D9Device. This reference count will be decremented upon destruction of this context through cudaThreadExit().

Parameters:
pD3D9Device - Direct3D device to use for this thread
device - The CUDA device to use. This device must be among the devices returned when querying cudaD3D9DeviceListAll from cudaD3D9GetDevices, may be set to -1 to automatically select an appropriate CUDA device.
Returns:
cudaSuccess, cudaErrorInitializationError, cudaErrorInvalidValue, cudaErrorSetOnActiveProcess
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cudaD3D9GetDevice, cudaGraphicsD3D9RegisterResource,


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA