Inheritance diagram for mammut::topology::Cpu:
mammut::topology::Unit

Public Member Functions

CpuId getCpuId () const
 
std::vector< PhysicalCore * > getPhysicalCores () const
 
std::vector< VirtualCore * > getVirtualCores () const
 
PhysicalCoregetPhysicalCore (PhysicalCoreId physicalCoreId) const
 
VirtualCoregetVirtualCore (VirtualCoreId virtualCoreId) const
 
VirtualCoregetVirtualCore () const
 
virtual std::string getVendorId () const =0
 
virtual std::string getFamily () const =0
 
virtual std::string getModel () const =0
 
virtual void maximizeUtilization () const =0
 
virtual void resetUtilization () const =0
 
bool isHotPluggable () const
 
bool isHotPlugged () const
 
void hotPlug () const
 
void hotUnplug () const
 

Protected Member Functions

 Cpu (CpuId cpuId, std::vector< PhysicalCore * > physicalCores)
 

Protected Attributes

const CpuId _cpuId
 
const std::vector< PhysicalCore * > _physicalCores
 
const std::vector< VirtualCore * > _virtualCores
 

Member Function Documentation

CpuId mammut::topology::Cpu::getCpuId ( ) const

Returns the identifier of this CPU.

Returns
The identifier of this CPU.
virtual std::string mammut::topology::Cpu::getFamily ( ) const
pure virtual

Returns the family of this Cpu.

Returns
The family of this Cpu.
virtual std::string mammut::topology::Cpu::getModel ( ) const
pure virtual

Returns the model of this Cpu.

Returns
The model of this Cpu.
PhysicalCore* mammut::topology::Cpu::getPhysicalCore ( PhysicalCoreId  physicalCoreId) const

Returns the physical core with the given identifier, or NULL if it is not present on this CPU.

Parameters
physicalCoreIdThe identifier of the physical core.
Returns
The physical core with the given identifier, or NULL if it is not present on this CPU.
std::vector<PhysicalCore*> mammut::topology::Cpu::getPhysicalCores ( ) const

Returns the physical cores of this CPU.

Returns
A vector of physical cores.
virtual std::string mammut::topology::Cpu::getVendorId ( ) const
pure virtual

Returns the vendor id of this Cpu.

Returns
The vendor id of this Cpu.
VirtualCore* mammut::topology::Cpu::getVirtualCore ( VirtualCoreId  virtualCoreId) const

Returns the virtual core with the given identifier, or NULL if it is not present on this CPU.

Parameters
virtualCoreIdThe identifier of the virtual core.
Returns
The virtual core with the given identifier, or NULL if it is not present on this CPU.
VirtualCore* mammut::topology::Cpu::getVirtualCore ( ) const

Returns a virtual core belonging to this Cpu, or NULL if it is not present.

Returns
A virtual core belonging to this Cpu, or NULL if it is not present.
std::vector<VirtualCore*> mammut::topology::Cpu::getVirtualCores ( ) const

Returns the virtual cores of this CPU.

Returns
A vector of virtual cores.
void mammut::topology::Cpu::hotPlug ( ) const

Hotplugs this CPU. If this CPU is not hot-pluggable, nothing is done.

void mammut::topology::Cpu::hotUnplug ( ) const

Hotunplugs this CPU. If this CPU is not hot-pluggable, nothing is done.

bool mammut::topology::Cpu::isHotPluggable ( ) const

Returns true if this CPU is hot-pluggable (i.e. if all its physical cores are hot-pluggable).

Returns
True if this CPU is hot-pluggable, false otherwise.
bool mammut::topology::Cpu::isHotPlugged ( ) const

Returns true if this CPU is hot plugged (i.e. if all its physical cores are hot plugged).

Returns
True if this CPU is hot plugged or if hotplug is not supported, false otherwise.
virtual void mammut::topology::Cpu::maximizeUtilization ( ) const
pure virtual

Bring the utilization of this CPU to 100% until resetUtilization() is called.

Implements mammut::topology::Unit.

virtual void mammut::topology::Cpu::resetUtilization ( ) const
pure virtual

Resets the utilization of this CPU.

Implements mammut::topology::Unit.


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