sys-sage
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Chip Class Reference

#include <Component.hpp>

Inheritance diagram for Chip:
Component

Public Member Functions

 Chip (int _id=0, string _name="Chip", int _type=SYS_SAGE_CHIP_TYPE_NONE)
 
 Chip (Component *parent, int _id=0, string _name="Chip", int _type=SYS_SAGE_CHIP_TYPE_NONE)
 
void SetVendor (string _vendor)
 
string GetVendor ()
 
void SetModel (string _model)
 
string GetModel ()
 
void SetChipType (int chipType)
 
int GetChipType ()
 
int UpdateMIGSettings (string uuid="")
 
int GetMIGNumSMs (string uuid="")
 
int GetMIGNumCores (string uuid="")
 
- Public Member Functions inherited from Component
 Component (int _id=0, string _name="unknown", int _componentType=SYS_SAGE_COMPONENT_NONE)
 
 Component (Component *parent, int _id=0, string _name="unknown", int _componentType=SYS_SAGE_COMPONENT_NONE)
 
void InsertChild (Component *child)
 
int InsertBetweenParentAndChild (Component *parent, Component *child, bool alreadyParentsChild)
 
int InsertBetweenParentAndChildren (Component *parent, vector< Component * > children, bool alreadyParentsChild)
 
int RemoveChild (Component *child)
 
void SetParent (Component *parent)
 
void PrintSubtree ()
 
void PrintAllDataPathsInSubtree ()
 
string GetName ()
 
void SetName (string _name)
 
int GetId ()
 
int GetComponentType ()
 
string GetComponentTypeStr ()
 
vector< Component * > * GetChildren ()
 
ComponentGetParent ()
 
ComponentGetChild (int _id)
 
ComponentGetChildById (int _id)
 
ComponentGetChildByType (int _componentType)
 
vector< Component * > GetAllChildrenByType (int _componentType)
 
void GetAllChildrenByType (vector< Component * > *_outArray, int _componentType)
 
ComponentFindSubcomponentById (int _id, int _componentType)
 
ComponentGetSubcomponentById (int _id, int _componentType)
 
void GetAllSubcomponentsByType (vector< Component * > *outArray, int _componentType)
 
vector< Component * > GetAllSubcomponentsByType (int _componentType)
 
int CountAllSubcomponents ()
 
int CountAllSubcomponentsByType (int _componentType)
 
int CountAllChildrenByType (int _componentType)
 
ComponentGetAncestorByType (int _componentType)
 
int GetNumThreads ()
 
int GetSubtreeDepth ()
 
ComponentGetNthAncestor (int n)
 
void GetNthDescendents (vector< Component * > *outArray, int depth)
 
vector< Component * > GetNthDescendents (int depth)
 
void GetSubcomponentsByType (vector< Component * > *outArray, int componentType)
 
vector< Component * > GetSubcomponentsByType (int _componentType)
 
void GetComponentsInSubtree (vector< Component * > *outArray)
 
vector< Component * > GetComponentsInSubtree ()
 
vector< DataPath * > * GetDataPaths (int orientation)
 
DataPathGetDataPathByType (int dp_type, int orientation)
 
void GetAllDataPathsByType (vector< DataPath * > *outDpArr, int dp_type, int orientation)
 
vector< DataPath * > GetAllDataPathsByType (int dp_type, int orientation)
 
int CheckComponentTreeConsistency ()
 Checks the consistency of the component tree starting from this component.
 
int GetTopologySize (unsigned *out_component_size, unsigned *out_dataPathSize)
 
int GetDepth (bool refresh)
 
void DeleteDataPath (DataPath *dp)
 
void DeleteAllDataPaths ()
 
void DeleteSubtree ()
 
void Delete (bool withSubtree=true)
 

Additional Inherited Members

- Public Attributes inherited from Component
std::map< std::string, void * > attrib
 
- Protected Attributes inherited from Component
int id
 
int depth
 
string name
 
int count {-1}
 
const int componentType
 
vector< Component * > children
 
Componentparent { nullptr }
 
vector< DataPath * > dp_incoming
 
vector< DataPath * > dp_outgoing
 

Detailed Description

Class Chip - represents a building block of a node. It may be a CPU socket, a GPU, a NIC or any other chip.
This class is a child of Component class, therefore inherits its attributes and methods.

Constructor & Destructor Documentation

◆ Chip() [1/2]

Chip::Chip ( int _id = 0,
string _name = "Chip",
int _type = SYS_SAGE_CHIP_TYPE_NONE )

Chip constructor (no automatic insertion in the Component Tree). Sets:

Parameters
_id= id, default 0
_name= name, default "Chip"
_type= chip type, default SYS_SAGE_CHIP_TYPE_NONE. Defines which chip we are describing. The options are: SYS_SAGE_CHIP_TYPE_NONE (default/generic), SYS_SAGE_CHIP_TYPE_CPU, SYS_SAGE_CHIP_TYPE_CPU_SOCKET, SYS_SAGE_CHIP_TYPE_GPU.
componentType=>SYS_SAGE_COMPONENT_CHIP

◆ Chip() [2/2]

Chip::Chip ( Component * parent,
int _id = 0,
string _name = "Chip",
int _type = SYS_SAGE_CHIP_TYPE_NONE )

Chip constructor with insertion into the Component Tree as the parent 's child (as long as parent is an existing Component). Sets:

Parameters
parent= the parent
_id= id, default 0
_name= name, default "Chip"
_type= chip type, default SYS_SAGE_CHIP_TYPE_NONE. Defines which chip we are describing. The options are: SYS_SAGE_CHIP_TYPE_NONE (default/generic), SYS_SAGE_CHIP_TYPE_CPU, SYS_SAGE_CHIP_TYPE_CPU_SOCKET, SYS_SAGE_CHIP_TYPE_GPU.
componentType=>SYS_SAGE_COMPONENT_CHIP

Member Function Documentation

◆ GetChipType()

int Chip::GetChipType ( )

Gets the type of the chip.

Returns
The chip type.
See also
type

◆ GetMIGNumCores()

int Chip::GetMIGNumCores ( string uuid = "")

Gets the number of cores for the MIG.

Parameters
uuid- The UUID of the chip, default is an empty string.
Returns
The number of cores.

◆ GetMIGNumSMs()

int Chip::GetMIGNumSMs ( string uuid = "")

Gets the number of SMs for the MIG.

Parameters
uuid- The UUID of the chip, default is an empty string.
Returns
The number of SMs.

◆ GetModel()

string Chip::GetModel ( )

Gets the model of the chip.

Returns
The model name.
See also
model

◆ GetVendor()

string Chip::GetVendor ( )

Gets the vendor of the chip.

Returns
The name of the vendor.
See also
vendor

◆ SetChipType()

void Chip::SetChipType ( int chipType)

Sets the type of the chip.

Parameters
chipType- The chip type to set.

◆ SetModel()

void Chip::SetModel ( string _model)

Sets the model of the chip.

Parameters
_model- The model name to set.

◆ SetVendor()

void Chip::SetVendor ( string _vendor)

Sets the vendor of the chip.

Parameters
_vendor- The name of the vendor to set.

◆ UpdateMIGSettings()

int Chip::UpdateMIGSettings ( string uuid = "")

Updates the MIG settings for the chip.

Parameters
uuid- The UUID of the chip, default is an empty string.
Returns
Status of the update operation.

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