Click or drag to resize
SoDevice Class

Abstract device management class.

Inheritance Hierarchy

Namespace: OIV.Inventor.Devices
Assembly: OIV.Inventor.Base (in OIV.Inventor.Base.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
public class SoDevice : SoNetBase

The SoDevice type exposes the following members.

Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetAvailableMemory

Returns the current available memory of this device in bytes.

Public methodStatic memberGetDevice

Returns the SoDevice pointed by index.

Public methodGetDeviceName

Returns the name of this device.

Public methodStatic memberGetDevicesCount

Returns the number of devices.

Public methodGetDriverVersion

Returns the driver version of this device.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetLogicalUnits

Returns the number of logical units of this device.

Public methodGetTotalMemory

Returns the total memory of this device in bytes.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyStatic memberfind

Performs a generic search on the list of devices.

Top
Remarks

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:

  • SoCpuDevice: A system CPU, including multiple cores.

  • SoCudaDevice: A GPU, managed through Nvidia's CUDA API.

  • SoGLDevice: A GPU, managed through the OpenGL API.

  • SoOpenCLDevice: A CPU or GPU, managed through the OpenCL API.

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