SoCudaDevice Class Reference
[CUDA device]

VSG extension CUDA device management class More...

#include <Inventor/devices/SoCudaDevice.h>

Inheritance diagram for SoCudaDevice:
SoDevice

List of all members.

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 SoCudaDevicefindFirstAvailableDevice ()
static SoCudaDevicegetDevice (int index)
static unsigned int getDevicesCount ()

Friends

class SoDevice
std::ostream & operator<< (std::ostream &os, const SoCudaDevice &dev)

Detailed Description

VSG extension 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.

SEE ALSO

SoCuda, SoCudaApi, SoCudaContext, SoCudaBufferObject, SoCpuDevice, SoGLDevice, SoOpenCLDevice

See related examples:

DevicesProperties, ComputeSlice, CudaMarchingCubes


Member Function Documentation

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.

Returns:
The supported CUDA version.
int SoCudaDevice::getCudaDeviceId (  )  const

Returns the CUDA device ID.

Returns:
The CUDA device id.
static SoCudaDevice* SoCudaDevice::getDevice ( int  index  )  [static]

Returns the SoCudaDevice indicated by index (starting with zero).

Parameters:
index The index of the SoCudaDevice.

Reimplemented from SoDevice.

virtual SbString SoCudaDevice::getDeviceName (  )  const [virtual]

Returns the device name.

Returns:
The device name.

Implements SoDevice.

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.

Returns:
The total memory in bytes on the device.

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.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SoCudaDevice dev 
) [friend]

Prints information about this device.

friend class SoDevice [friend]

The documentation for this class was generated from the following file:

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/