Functions for selecting a CUDA device. More...
Functions | |
RXLF_API int | Rx::ApiLF::RxCudaDeviceCount () |
Returns the number of CUDA devices installed. More... | |
RXLF_API void | Rx::ApiLF::RxCudaDeviceMemInfo (size_t &nFreeMem, size_t &nTotalMem) |
Return free and total amount of memory on the selected CUDA device. More... | |
RXLF_API void | Rx::ApiLF::RxCudaDeviceProp (int iDevice, Rx::CRxString &sxName, unsigned &iCCMajor, unsigned &iCCMinor) |
Get the name and the compute capability major and minor version for a CUDA device. More... | |
RXLF_API void | Rx::ApiLF::RxCudaSelectDevice (int iDevice=-1, bool bUseGL=false) |
Select a CUDA device. More... | |
Functions for selecting a CUDA device.
RXLF_API int Rx::ApiLF::RxCudaDeviceCount | ( | ) |
Returns the number of CUDA devices installed.
RXLF_API void Rx::ApiLF::RxCudaDeviceMemInfo | ( | size_t & | nFreeMem, |
size_t & | nTotalMem | ||
) |
Return free and total amount of memory on the selected CUDA device.
[out] | nFreeMem | On return contains the amount of free memory in bytes. |
[out] | nTotalMem | On return contains the amount of total memory in bytes. |
RXLF_API void Rx::ApiLF::RxCudaDeviceProp | ( | int | iDevice, |
Rx::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. | |
[out] | sxName | On return contains the name of the CUDA device. |
[out] | iCCMajor | On return contains the major version of the CUDA device compute capability. |
[out] | iCCMinor | On return contains the minor version of the CUDA device compute capability. |
RXLF_API void Rx::ApiLF::RxCudaSelectDevice | ( | int | iDevice = -1 , |
bool | bUseGL = false |
||
) |
Select a CUDA device.
Use the functions Rx::ApiLF::RxCudaDeviceCount and Rx::ApiLF::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.
iDevice | (Optional) The zero-based CUDA device ID or -1 for automatic selection. |
bUseGL | (Optional) Flag indicating whether to initialize CUDA for OpenGL interop. or not. |