Functions for selecting a CUDA device.
More...
Functions for selecting a CUDA device.
static System::Int32 Rx::Net::ApiLF::RxCudaDeviceCount |
( |
| ) |
|
|
static |
Returns the number of CUDA devices installed.
- Returns
- The number of CUDA devices.
static System::Void Rx::Net::ApiLF::RxCudaDeviceMemInfo |
( |
System::UInt64% |
uFreeMem, |
|
|
System::UInt64% |
uTotalMem |
|
) |
| |
|
static |
Return free and total amount of memory on the selected CUDA device.
- Warning
- This function will throw an Rx::Net::RxException if called before the first call of Rx::Net::ApiLF::RxRayBind.
- Halcon Plugin - Function Name:
- rx_cuda_device_mem_info
- Parameters
-
[out] | uFreeMem | On return contains the amount of free memory in bytes. |
[out] | uTotalMem | On return contains the amount of total memory in bytes. |
static System::Void Rx::Net::ApiLF::RxCudaDeviceProp |
( |
System::Int32 |
iDevice, |
|
|
System::String^ % |
sName, |
|
|
System::UInt32% |
uCCMajor, |
|
|
System::UInt32% |
uCCMinor |
|
) |
| |
|
static |
Get the name and the compute capability major and minor version for a CUDA device.
- Parameters
-
| iDevice | Zero-based ID of the CUDA device. |
[out] | sName | On return contains the name of the CUDA device. |
[out] | uCCMajor | On return contains the major version of the CUDA device compute capability. |
[out] | uCCMinor | On return contains the minor version of the CUDA device compute capability. |
static System::Void Rx::Net::ApiLF::RxCudaSelectDevice |
( |
System::Int32 |
iDevice, |
|
|
System::Boolean |
bUseGL |
|
) |
| |
|
static |
Select a CUDA device.
- Attention
- This function must be called once and only once per process. The selected CUDA device cannot be changed during runtime.
Use the functions Rx::Net::ApiLF::RxCudaDeviceCount and Rx::Net::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.
- Halcon Plugin - Function Name:
- rx_cuda_select_device
- Parameters
-
iDevice | The zero-based CUDA device ID or -1 for automatic selection. |
bUseGL | Flag indicating whether to initialize CUDA for OpenGL interop. or not. |