Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoCpuDevice Class Reference

VSG extension CPU device management class More...

#include <Inventor/devices/SoCpuDevice.h>

+ Inheritance diagram for SoCpuDevice:

Public Types

enum  ProcessorArchitecture {
  X86_64 ,
  X86_32 ,
  IA64 ,
  PPC_32 ,
  PPC_64 ,
  UNKNOWN
}
 This enum contains the list of possible architectures for the CPU. More...
 
- Public Types inherited from SoDevice
typedef bool SoDeviceFindFunction(SoDevice *device)
 Find function type.
 

Public Member Functions

virtual SbString getDeviceName () const
 Returns the device name.
 
virtual unsigned long long getTotalMemory () const
 Returns the total memory of this device in bytes.
 
virtual unsigned long long getAvailableMemory () const
 Returns the current available memory of this device in bytes.
 
virtual SbString getDriverVersion () const
 Returns the driver version of this device.
 
ProcessorArchitecture getArchitecture () const
 Returns the architecture of the processor.
 
bool isActive () const
 Returns true if the CPU is active in the system.
 
bool hasMMX () const
 Returns true if MMX instructions are supported on this device.
 
bool hasSSE () const
 Returns if SSE instructions are supported on this device.
 
int getSSELevel () const
 Returns the SSE instruction level available on this device.
 
virtual unsigned int getLogicalUnits () const
 Returns the number of cores available on this device.
 
unsigned int getCacheSize (int cacheLevel) const
 Returns the size of the cache on this device in bytes.
 

Static Public Member Functions

static SoCpuDevicegetDevice (int index=0)
 Returns the SoCpuDevice.
 
static unsigned int getDevicesCount ()
 Returns the total number of cores available in the sytem.
 
static SoCpuDevicefindFirstAvailableDevice ()
 Returns the first available device found in the system.
 
static void initClass ()
 This function detects the CPU available in the system.
 
static void exitClass ()
 This function frees the allocated memory.
 
- Static Public Member Functions inherited from SoDevice
static SoDevicefind (SoDeviceFindFunction *findFunction)
 Performs a generic search on the list of devices.
 
static unsigned int getDevicesCount ()
 Returns the number of devices.
 
static SoDevicegetDevice (int index)
 Returns the SoDevice pointed by index.
 

Friends

class SoDevice
 
std::ostream & operator<< (std::ostream &os, const SoCpuDevice &dev)
 Prints information about the device.
 

Detailed Description

VSG extension CPU device management class

This class provides functions to manage or to get data for each CPU device available in the system.

Please see SoDevice for general information about the device classes.

SEE ALSO

SoCpuContext, SoCpuBufferObject, SoDevice, SoGLDevice

Definition at line 50 of file SoCpuDevice.h.

Member Enumeration Documentation

◆ ProcessorArchitecture

This enum contains the list of possible architectures for the CPU.

Enumerator
X86_64 
X86_32 
IA64 
PPC_32 
PPC_64 
UNKNOWN 

Definition at line 68 of file SoCpuDevice.h.

Member Function Documentation

◆ exitClass()

static void SoCpuDevice::exitClass ( )
static

This function frees the allocated memory.

◆ findFirstAvailableDevice()

static SoCpuDevice * SoCpuDevice::findFirstAvailableDevice ( )
static

Returns the first available device found in the system.

◆ getArchitecture()

SoCpuDevice::ProcessorArchitecture SoCpuDevice::getArchitecture ( ) const
inline

Returns the architecture of the processor.

Definition at line 261 of file SoCpuDevice.h.

◆ getAvailableMemory()

virtual unsigned long long SoCpuDevice::getAvailableMemory ( ) const
virtual

Returns the current available memory of this device in bytes.

Implements SoDevice.

◆ getCacheSize()

unsigned int SoCpuDevice::getCacheSize ( int  cacheLevel) const

Returns the size of the cache on this device in bytes.

Note: On Microsoft Windows platforms this function only returns a valid number on Windows XP SP3 and newer.

Parameters
cacheLevelThe cache level can be 1, 2, or 3.

◆ getDevice()

static SoCpuDevice * SoCpuDevice::getDevice ( int  index = 0)
static

Returns the SoCpuDevice.

Parameters
indexnot used.

◆ getDeviceName()

virtual SbString SoCpuDevice::getDeviceName ( ) const
virtual

Returns the device name.

Returns
The device name.

Implements SoDevice.

◆ getDevicesCount()

static unsigned int SoCpuDevice::getDevicesCount ( )
static

Returns the total number of cores available in the sytem.

◆ getDriverVersion()

virtual SbString SoCpuDevice::getDriverVersion ( ) const
inlinevirtual

Returns the driver version of this device.


Always returns 0.0 on CPU device.

Implements SoDevice.

Definition at line 90 of file SoCpuDevice.h.

◆ getLogicalUnits()

virtual unsigned int SoCpuDevice::getLogicalUnits ( ) const
virtual

Returns the number of cores available on this device.

Note: On Microsoft Windows platforms this function only returns a valid number on Windows XP SP3 and newer.

Implements SoDevice.

◆ getSSELevel()

int SoCpuDevice::getSSELevel ( ) const
inline

Returns the SSE instruction level available on this device.

Definition at line 285 of file SoCpuDevice.h.

◆ getTotalMemory()

unsigned long long SoCpuDevice::getTotalMemory ( ) const
inlinevirtual

Returns the total memory of this device in bytes.

Implements SoDevice.

Definition at line 254 of file SoCpuDevice.h.

◆ hasMMX()

bool SoCpuDevice::hasMMX ( ) const
inline

Returns true if MMX instructions are supported on this device.

Definition at line 292 of file SoCpuDevice.h.

◆ hasSSE()

bool SoCpuDevice::hasSSE ( ) const
inline

Returns if SSE instructions are supported on this device.

Definition at line 277 of file SoCpuDevice.h.

◆ initClass()

static void SoCpuDevice::initClass ( )
static

This function detects the CPU available in the system.

◆ isActive()

bool SoCpuDevice::isActive ( ) const
inline

Returns true if the CPU is active in the system.

Definition at line 269 of file SoCpuDevice.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const SoCpuDevice dev 
)
friend

Prints information about the device.

Definition at line 153 of file SoCpuDevice.h.

◆ SoDevice

friend class SoDevice
friend

Definition at line 52 of file SoCpuDevice.h.


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