CUDA device management class
More...
#include <Inventor/devices/SoCudaDevice.h>
Public Member Functions | |
| virtual unsigned long long | getTotalMemory () const |
| virtual unsigned long long | getAvailableMemory () const |
| virtual unsigned int | getLogicalUnits () const |
| virtual SbString | getDriverVersion () const |
| float | getComputingVersion () const |
| virtual SbString | getDeviceName () const |
| int | getCudaDeviceId () const |
| void | getMaxGridSize (int &x, int &y, int &z) const |
| SbVec3i32 | getMaxGridSize () const |
| SbVec3i32 | getMaxBlockSize () const |
| int | getMaxThreads () const |
| unsigned long long | getMaxSharedMemoryPerBlock () const |
| unsigned long long | getMemPitch () const |
Static Public Member Functions | |
| static void | init () |
| static bool | isInitialized () |
| static void | finish () |
| static SoCudaDevice * | findFirstAvailableDevice () |
| static SoCudaDevice * | getDevice (int index) |
| static unsigned int | getDevicesCount () |
Friends | |
| class | SoDevice |
| std::ostream & | operator<< (std::ostream &os, const SoCudaDevice &dev) |
CUDA device management class
This class provides functions to discover, and query information about, CUDA-enabled devices (typically GPUs) available in the system using NVIDIA's CUDA API. You can query the memory available on a device, the CUDA compute capability, etc.
Please see SoDevice for general information about the device classes.
NOTE: Before using these devices the application must initialize CUDA by calling SoCuda::init.
SoCuda, SoCudaApi, SoCudaContext, SoCudaBufferObject, SoCpuDevice, SoGLDevice, SoOpenCLDevice
| static SoCudaDevice* SoCudaDevice::findFirstAvailableDevice | ( | ) | [static] |
Returns the first available CUDA device in the system.
Note the result is always null if SoCuda::init() has not been called.
| static void SoCudaDevice::finish | ( | ) | [static] |
Unregister the class and previously registered devices.
| virtual unsigned long long SoCudaDevice::getAvailableMemory | ( | ) | const [virtual] |
Returns the current available memory on this device in bytes.
Implements SoDevice.
| float SoCudaDevice::getComputingVersion | ( | ) | const |
Returns the version of CUDA supported by the device.
| int SoCudaDevice::getCudaDeviceId | ( | ) | const |
Returns the CUDA device ID.
| static SoCudaDevice* SoCudaDevice::getDevice | ( | int | index | ) | [static] |
Returns the SoCudaDevice indicated by index (starting with zero).
| index | The index of the SoCudaDevice. |
Reimplemented from SoDevice.
| virtual SbString SoCudaDevice::getDeviceName | ( | ) | const [virtual] |
| static unsigned int SoCudaDevice::getDevicesCount | ( | ) | [static] |
Returns the number of CUDA capable GPUs in the system.
Note the result is always zero if SoCuda::init() has not been called.
Reimplemented from SoDevice.
| virtual SbString SoCudaDevice::getDriverVersion | ( | ) | const [virtual] |
Returns the driver version of this device.
Implements SoDevice.
| virtual unsigned int SoCudaDevice::getLogicalUnits | ( | ) | const [virtual] |
Returns the number of logical units of this device (i.e.
the number of cores of this GPU).
Implements SoDevice.
| SbVec3i32 SoCudaDevice::getMaxBlockSize | ( | ) | const |
Returns the maximum block size for this device.
| SbVec3i32 SoCudaDevice::getMaxGridSize | ( | ) | const |
Returns the maximum grid size for this device.
| void SoCudaDevice::getMaxGridSize | ( | int & | x, | |
| int & | y, | |||
| int & | z | |||
| ) | const |
Returns the maximum grid size for this device.
| unsigned long long SoCudaDevice::getMaxSharedMemoryPerBlock | ( | ) | const |
Returns the maximum size of the shared memory per block in bytes.
| int SoCudaDevice::getMaxThreads | ( | ) | const |
Returns the maximum number of threads per block.
| unsigned long long SoCudaDevice::getMemPitch | ( | ) | const |
Returns the memory pitch for this device.
| virtual unsigned long long SoCudaDevice::getTotalMemory | ( | ) | const [virtual] |
Returns the total available memory on this device in bytes.
Implements SoDevice.
| static void SoCudaDevice::init | ( | ) | [static] |
Detect and register available CUDA devices.
| static bool SoCudaDevice::isInitialized | ( | ) | [static] |
Returns true if module is currently initialized.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const SoCudaDevice & | dev | |||
| ) | [friend] |
Prints information about this device.
friend class SoDevice [friend] |