Functions for selecting a CUDA device. More...
Functions | |
| RXLF_API bool | Raytrix::RxCudaDeviceCount (int &iDeviceCount) |
| Returns the number of CUDA devices installed. | |
| RXLF_API bool | Raytrix::RxCudaDeviceMemInfo (unsigned &uFreeMem, unsigned &uTotalMem) |
| Return free and total amount of memory on the selected CUDA device. | |
| RXLF_API bool | Raytrix::RxCudaDeviceProp (int iDevice, CRxString &sxName, unsigned &iCCMajor, unsigned &iCCMinor) |
| Get the name and the compute capability major and minor version for a CUDA device. | |
| RXLF_API bool | Raytrix::RxCudaSelectDevice (int iDevice=-1, bool bUseGL=false) |
| Select a CUDA device. | |
Functions for selecting a CUDA device.
| RXLF_API bool Raytrix::RxCudaDeviceCount | ( | int & | iDeviceCount ) |
Returns the number of CUDA devices installed.
| iDeviceCount | Contains the number of CUDA devices on return. |
true if successful, false otherwise. If false is returned the error that caused the failure can be obtained by calling RxGetLastError(). | RXLF_API bool Raytrix::RxCudaDeviceMemInfo | ( | unsigned & | uFreeMem, |
| unsigned & | uTotalMem | ||
| ) |
Return free and total amount of memory on the selected CUDA device.
| uFreeMem | On return contains the amount of free memory in bytes. |
| uTotalMem | On return contains the amount of total memory in bytes. |
true if successful, false otherwise. If false is returned the error that caused the failure can be obtained by calling RxGetLastError(). | RXLF_API bool Raytrix::RxCudaDeviceProp | ( | int | iDevice, |
| CRxString & | sxName, | ||
| unsigned & | iCCMajor, | ||
| unsigned & | iCCMinor | ||
| ) |
Get the name and the compute capability major and minor version for a CUDA device.
| iDevice | Zero-based ID of the CUDA device. |
| sxName | On return contains the name of the CUDA device. |
| iCCMajor | On return contains the major version of the CUDA device compute capability. |
| iCCMinor | On return contains the minor version of the CUDA device compute capability. |
true if successful, false otherwise. If false is returned the error that caused the failure can be obtained by calling RxGetLastError(). | RXLF_API bool Raytrix::RxCudaSelectDevice | ( | int | iDevice = -1, |
| bool | bUseGL = false |
||
| ) |
Select a CUDA device.
| iDevice | The zero-based CUDA device ID or -1 for automatic selection. |
| bUseGL | Flag indicating whether to initialize CUDA for OpenGL interop. or not. |
Use the functions RxCudaDeviceCount() and RxCudaDeviceProp() to obtain information about the installed CUDA devices and then select the most appropriate CUDA device with this function. If iDevice is set to -1, the first appropriate CUDA device is selected.
To exchange image data generated by CUDA directly with an OpenGL rendering context on the same device, bUseGL has to be set to true and the CUDA device has to support OpenGL 3.0 or higher. Note that CUDA/DirectX interop. is currently not supported.
For further details on CUDA/OpenGL interop. see CUDA/OpenGL interop. functions.
true if successful, false otherwise. If false is returned the error that caused the failure can be obtained by calling RxGetLastError().