CUresult cuGLGetDevices ( unsigned int *  pCudaDeviceCount,
CUdevice pCudaDevices,
unsigned int  cudaDeviceCount,
CUGLDeviceList  deviceList 
)

Returns in *pCudaDeviceCount the number of CUDA-compatible devices corresponding to the current OpenGL context. Also returns in *pCudaDevices at most cudaDeviceCount of the CUDA-compatible devices corresponding to the current OpenGL context. If any of the GPUs being used by the current OpenGL context are not CUDA capable then the call will return CUDA_ERROR_NO_DEVICE.

The deviceList argument may be any of the following:

  • CU_GL_DEVICE_LIST_ALL: Query all devices used by the current OpenGL context.
  • CU_GL_DEVICE_LIST_CURRENT_FRAME: Query the devices used by the current OpenGL context to render the current frame (in SLI).
  • CU_GL_DEVICE_LIST_NEXT_FRAME: Query the devices used by the current OpenGL context to render the next frame (in SLI). Note that this is a prediction, it can't be guaranteed that this is correct in all cases.

Parameters:
pCudaDeviceCount - Returned number of CUDA devices.
pCudaDevices - Returned CUDA devices.
cudaDeviceCount - The size of the output device array pCudaDevices.
deviceList - The set of devices to return.
Returns:
CUDA_SUCCESS, CUDA_ERROR_NO_DEVICE, CUDA_ERROR_INVALID_VALUE CUDA_ERROR_INVALID_CONTEXT
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cuGLCtxCreate, cuGLInit, cuWGLGetDevice


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA