Raytrix Light Field SDK  v3.0
Logo
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
CUDA API functions

Functions for selecting a CUDA device. More...

Functions

static System::Int32 Rx::Net::ApiLF::RxCudaDeviceCount ()
 Returns the number of CUDA devices installed. More...
 
static System::Void Rx::Net::ApiLF::RxCudaDeviceMemInfo (System::UInt64% uFreeMem, System::UInt64% uTotalMem)
 Return free and total amount of memory on the selected CUDA device. More...
 
static System::Void Rx::Net::ApiLF::RxCudaDeviceProp (System::Int32 iDevice, System::String^ %sName, System::UInt32% uCCMajor, System::UInt32% uCCMinor)
 Get the name and the compute capability major and minor version for a CUDA device. More...
 
static System::Void Rx::Net::ApiLF::RxCudaSelectDevice (System::Int32 iDevice, System::Boolean bUseGL)
 Select a CUDA device. More...
 

Detailed Description

Functions for selecting a CUDA device.

Function Documentation

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]uFreeMemOn return contains the amount of free memory in bytes.
[out]uTotalMemOn 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
iDeviceZero-based ID of the CUDA device.
[out]sNameOn return contains the name of the CUDA device.
[out]uCCMajorOn return contains the major version of the CUDA device compute capability.
[out]uCCMinorOn 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
iDeviceThe zero-based CUDA device ID or -1 for automatic selection.
bUseGLFlag indicating whether to initialize CUDA for OpenGL interop. or not.