CPU device management class More...
#include <Inventor/devices/SoCpuDevice.h>
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 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 SoCpuDevice * | getDevice (int index=0) |
Returns the SoCpuDevice. | |
static unsigned int | getDevicesCount () |
Returns the total number of cores available in the sytem. | |
static SoCpuDevice * | findFirstAvailableDevice () |
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 SoDevice * | find (SoDeviceFindFunction *findFunction) |
Performs a generic search on the list of devices. | |
static unsigned int | getDevicesCount () |
Returns the number of devices. | |
static SoDevice * | getDevice (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. | |
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.
SoCpuContext, SoCpuBufferObject, SoDevice, SoGLDevice
Definition at line 50 of file SoCpuDevice.h.
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.
|
static |
This function frees the allocated memory.
|
static |
Returns the first available device found in the system.
|
inline |
Returns the architecture of the processor.
Definition at line 261 of file SoCpuDevice.h.
|
virtual |
Returns the current available memory of this device in bytes.
Implements SoDevice.
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.
cacheLevel | The cache level can be 1, 2, or 3. |
|
static |
Returns the SoCpuDevice.
index | not used. |
|
virtual |
|
static |
Returns the total number of cores available in the sytem.
|
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.
|
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.
|
inline |
Returns the SSE instruction level available on this device.
Definition at line 285 of file SoCpuDevice.h.
|
inlinevirtual |
Returns the total memory of this device in bytes.
Implements SoDevice.
Definition at line 254 of file SoCpuDevice.h.
|
inline |
Returns true if MMX instructions are supported on this device.
Definition at line 292 of file SoCpuDevice.h.
|
inline |
Returns if SSE instructions are supported on this device.
Definition at line 277 of file SoCpuDevice.h.
|
static |
This function detects the CPU available in the system.
|
inline |
Returns true if the CPU is active in the system.
Definition at line 269 of file SoCpuDevice.h.
|
friend |
Prints information about the device.
Definition at line 153 of file SoCpuDevice.h.
|
friend |
Definition at line 52 of file SoCpuDevice.h.