Records pD3D11Device as the Direct3D 11 device to use for Direct3D 11 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 pD3D11Device will increase the internal reference count on pD3D11Device. This reference count will be decremented upon destruction of this context through cudaThreadExit().
Parameters:
pD3D11Device
- Direct3D device to use for interoperability
device
- The CUDA device to use. This device must be among the devices returned when querying cudaD3D11DeviceListAll from cudaD3D11GetDevices, may be set to -1 to automatically select an appropriate CUDA device.