SoDevice Class Reference
[Devices]

VSG extension Abstract device management class More...

#include <Inventor/devices/SoDevice.h>

Inheritance diagram for SoDevice:

List of all members.

Public Member Functions

virtual unsigned long long getTotalMemory () const =0
virtual unsigned long long getAvailableMemory () const =0
virtual unsigned int getLogicalUnits () const =0
virtual SbString getDriverVersion () const =0
virtual SbString getDeviceName () const =0

Static Public Member Functions

static SoDevicefind (SoDeviceFindFunction *findFunction)
static unsigned int getDevicesCount ()
static SoDevicegetDevice (int index)

Detailed Description

VSG extension Abstract device management class

This class provides generic functions to manage and to get data about specific devices.

There are specific implementations of this class for each type of device supported by Open Inventor. These classes may provide additional methods to query information specific to the device type. Currently the supported device types are:

A single physical device may be accessible as more than one type of logical device. For example, a GPU (graphics board) may be accessible as an OpenGL device and as a CUDA device. Using the query methods, you can determine the number of each type of device and specific information about each device such as the total memory.

Before using any CUDA or OpenCL devices, the application must initialize the corresponding module using SoCuda::init() or SoOpenCL::init() These methods should only be called after initializing Open Inventor (using SoXt::init() etc).

On most devices other than the CPU, a device "context" is necessary when using the device. Open Inventor provides classes to manage contexts for each type of device. See SoDeviceContext and its derived classes SoCpuContext, SoCudaContext, SoGLContext and SoOpenCLContext.

Open Inventor provides classes to manage data objects (blocks of memory), called buffer objects, on each type of device. See SoBufferObject and its derived classes SoCpuBufferObject, SoCudaBufferObject, SoGLBufferObject and SoOpenCLBufferObject.

On some devices, for example CUDA and OpenCL, Open Inventor provides a wrapper class that allows the application to call functions in the corresponding API using object oriented methods. See SoCudaApi and SoOpenCLApi.

Open Inventor also provides a set of classes that implement commonly used computing algorithms that operate on data buffer objects. See, for example: SoArithmetic, SoConversion, SoConvolution and SoSeismic. Some of these classes have device specific implementations, for example SoCudaConvolution and SoOpenCLConvolution.

Note: The word "device" is also used to refer to input devices such as the mouse and keyboard. These devices are associated with the viewer or render area and are represented by window system dependent classes. See, for example: SoWinDevice, SoQtDevice and SoXtDevice.

SEE ALSO

SoCpuDevice, SoCudaDevice, SoGLDevice, SoOpenCLDevice

See related examples:

DevicesProperties


Member Function Documentation

static SoDevice* SoDevice::find ( SoDeviceFindFunction findFunction  )  [static]

Performs a generic search on the list of devices.


The SoDeviceFindFunction should return true if a device is the one we are looking for.

Parameters:
findFunction The find function to be called on each device.
virtual unsigned long long SoDevice::getAvailableMemory (  )  const [pure virtual]

Returns the current available memory of this device in bytes.

Implemented in SoCpuDevice, SoCudaDevice, SoGLDevice, and SoOpenCLDevice.

static SoDevice* SoDevice::getDevice ( int  index  )  [static]

Returns the SoDevice pointed by index.

Parameters:
index the index of the SoDevice.

Reimplemented in SoCpuDevice, SoCudaDevice, SoGLDevice, and SoOpenCLDevice.

virtual SbString SoDevice::getDeviceName (  )  const [pure virtual]

Returns the name of this device.

Implemented in SoCpuDevice, SoCudaDevice, SoGLDevice, and SoOpenCLDevice.

static unsigned int SoDevice::getDevicesCount (  )  [static]

Returns the number of devices.

Reimplemented in SoCpuDevice, SoCudaDevice, SoGLDevice, and SoOpenCLDevice.

virtual SbString SoDevice::getDriverVersion (  )  const [pure virtual]

Returns the driver version of this device.

Implemented in SoCpuDevice, SoCudaDevice, SoGLDevice, and SoOpenCLDevice.

virtual unsigned int SoDevice::getLogicalUnits (  )  const [pure virtual]

Returns the number of logical units of this device.

Implemented in SoCpuDevice, SoCudaDevice, SoGLDevice, and SoOpenCLDevice.

virtual unsigned long long SoDevice::getTotalMemory (  )  const [pure virtual]

Returns the total memory of this device in bytes.

Implemented in SoCpuDevice, SoCudaDevice, SoGLDevice, and SoOpenCLDevice.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/