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

Represents a data path (arbitrary relation or data movement) between two Components in the topology. More...

#include <DataPath.hpp>

Inheritance diagram for sys_sage::DataPath:
sys_sage::Relation

Public Member Functions

 DataPath (Component *_source, Component *_target, sys_sage::DataPathOrientation::type _oriented, sys_sage::DataPathType::type _dp_type=sys_sage::DataPathType::None)
 DataPath constructor.
 
 DataPath (Component *_source, Component *_target, sys_sage::DataPathOrientation::type _oriented, double _bw, double _latency)
 DataPath constructor. DataPath type is set to DataPathType::None.
 
 DataPath (Component *_source, Component *_target, sys_sage::DataPathOrientation::type _oriented, sys_sage::DataPathType::type _dp_type, double _bw, double _latency)
 DataPath constructor.
 
ComponentGetSource () const
 Retrieves the source Component.
 
ComponentGetTarget () const
 Retrieves the target Component.
 
double GetBandwidth () const
 Retrieves the bandwidth from the source to the target.
 
void SetBandwidth (double _bandwidth)
 Sets the bandwidth from the source to the target.
 
double GetLatency () const
 
void SetLatency (double _latency)
 Sets the data load latency from the source to the target.
 
int UpdateSource (Component *_new_source)
 Updates the source of the DataPath. The datapath is removed from the outgoing/incoming vectors of the old source and added to the vectors of the new source.
 
int UpdateTarget (Component *_new_target)
 Updates the target of the DataPath. The datapath is removed from the outgoing/incoming vectors of the old target and added to the vectors of the new target.
 
int GetDataPathType () const
 
int GetOrientation () const
 Retrieves the orientation of the DataPath (DataPathOrientation::Oriented or DataPathOrientation::Bidirectional).
 
void Print () const override
 Prints basic information about the Data Path to stdout. Prints componentType and Id of the source and target Components, the bandwidth, load latency, and the attributes. For each attribute, the name and value are printed; the value is only retyped to uint64_t (so will print nonsensical values for other data types).
 
void Delete () override
 Deletes and de-allocates the DataPath pointer from the list (std::vector) of outgoing and incoming DataPaths of source and target Components.
 
- Public Member Functions inherited from sys_sage::Relation
 Relation (const std::vector< Component * > &components, int _id=0, bool _ordered=true)
 Construct a new Relation object.
 
void SetId (int _id)
 Sets the id of the relationship.
 
int GetId () const
 Gets the id of the relationship.
 
RelationType::type GetType () const
 Get the type of the relation.
 
std::string GetTypeStr () const
 Return a human-readable name of the relation type.
 
bool IsOrdered () const
 Check if this relation treats component order as meaningful.
 
bool ContainsComponent (Component *c) const
 Check whether the given component is part of this relation.
 
ComponentGetComponent (int index) const
 Get the component at a specific position.
 
const std::vector< Component * > & GetComponents () const
 Access the list of components.
 
void AddComponent (Component *c)
 Add a new component to the relation.
 
int UpdateComponent (int index, Component *_new_component)
 Replace a component at the given index.
 
int UpdateComponent (Component *_old_component, Component *_new_component)
 Replace the first occurrence of a given component.
 
 ~Relation ()=default
 Destructor for the Relation class.
 

Additional Inherited Members

- Public Attributes inherited from sys_sage::Relation
std::map< std::string, void * > attrib
 
- Protected Attributes inherited from sys_sage::Relation
bool ordered
 Whether order in the component list is meaningful.
 
int id
 The id of the relationship.
 
RelationType::type type
 The type of the relationship (see RelationType::type).
 
std::vector< Component * > components
 A vector of components associated with the relationship.
 

Detailed Description

Represents a data path (arbitrary relation or data movement) between two Components in the topology.

DataPaths form a data-path graph, which is orthogonal to the Component Tree. Each Component contains references to all DataPaths going to or from it, in addition to its parent and children in the Component Tree. This enables navigation between Components and access to data stored in Components or DataPaths.

DataPaths can be oriented (directed) or bidirectional, and can carry additional information such as bandwidth, latency, and user-defined types. They are essential for modeling memory hierarchies, interconnects, and other logical or physical data flows in heterogeneous systems.

Constructor & Destructor Documentation

◆ DataPath() [1/3]

sys_sage::DataPath::DataPath ( Component * _source,
Component * _target,
sys_sage::DataPathOrientation::type _oriented,
sys_sage::DataPathType::type _dp_type = sys_sage::DataPathType::None )

DataPath constructor.

Parameters
_sourcePointer to the source Component. (If _oriented == DataPathOrientation::Bidirectional, there is no difference between _source and _target)
_targetPointer to the target Component.
_orientedIs the Data Path oriented? (DataPathOrientation::Oriented = oriented DP; DataPathOrientation::Bidirectional = NOT oriented DP)
_dp_type(optional) Type of the Data Path (user-defined, default: DataPathType::None). Predefined types: DataPathType::None, DataPathType::Logical, DataPathType::Physical, DataPathType::Datatransfer, DataPathType::L3CAT, DataPathType::MIG, DataPathType::C2C . Each user can define an arbitrary type in the DataPathType namespace.

◆ DataPath() [2/3]

sys_sage::DataPath::DataPath ( Component * _source,
Component * _target,
sys_sage::DataPathOrientation::type _oriented,
double _bw,
double _latency )

DataPath constructor. DataPath type is set to DataPathType::None.

Parameters
_sourcePointer to the source Component. (If _oriented == DataPathOrientation::Bidirectional, there is no difference between _source and _target)
_targetPointer to the target Component.
_orientedIs the Data Path oriented? (DataPathOrientation::Oriented = oriented DP; DataPathOrientation::Bidirectional = NOT oriented DP)
_bwBandwidth from the source (provides the data) to the target (requests the data)
_latencyData load latency from the source (provides the data) to the target (requests the data)

◆ DataPath() [3/3]

sys_sage::DataPath::DataPath ( Component * _source,
Component * _target,
sys_sage::DataPathOrientation::type _oriented,
sys_sage::DataPathType::type _dp_type,
double _bw,
double _latency )

DataPath constructor.

Parameters
_sourcePointer to the source Component. (If _oriented == DataPathOrientation::Bidirectional, there is no difference between _source and _target)
_targetPointer to the target Component.
_orientedIs the Data Path oriented? (DataPathOrientation::Oriented = oriented DP; DataPathOrientation::Bidirectional = NOT oriented DP)
_dp_type(optional) Type of the Data Path (user-defined, default: DataPathType::None). Predefined types: DataPathType::None, DataPathType::Logical, DataPathType::Physical, DataPathType::Datatransfer, DataPathType::L3CAT, DataPathType::MIG, DataPathType::C2C . Each user can define an arbitrary type in the DataPathType namespace.
_bwBandwidth from the source (provides the data) to the target (requests the data)
_latencyData load latency from the source (provides the data) to the target (requests the data)

Member Function Documentation

◆ Delete()

void sys_sage::DataPath::Delete ( )
overridevirtual

Deletes and de-allocates the DataPath pointer from the list (std::vector) of outgoing and incoming DataPaths of source and target Components.

Reimplemented from sys_sage::Relation.

◆ GetBandwidth()

double sys_sage::DataPath::GetBandwidth ( ) const

Retrieves the bandwidth from the source to the target.

Returns
Bandwidth from the source(provides the data) to the target(requests the data)

◆ GetDataPathType()

int sys_sage::DataPath::GetDataPathType ( ) const
Returns
Type of the Data Path (DataPathType). Do not mix with RelationType!
See also
type

◆ GetLatency()

double sys_sage::DataPath::GetLatency ( ) const
Returns
Data load latency from the source(provides the data) to the target(requests the data)

◆ GetOrientation()

int sys_sage::DataPath::GetOrientation ( ) const

Retrieves the orientation of the DataPath (DataPathOrientation::Oriented or DataPathOrientation::Bidirectional).

Returns
orientation
See also
oriented

◆ GetSource()

sys_sage::Component * sys_sage::DataPath::GetSource ( ) const

Retrieves the source Component.

Returns
Pointer to the source Component

◆ GetTarget()

sys_sage::Component * sys_sage::DataPath::GetTarget ( ) const

Retrieves the target Component.

Returns
Pointer to the target Component

◆ Print()

void sys_sage::DataPath::Print ( ) const
overridevirtual

Prints basic information about the Data Path to stdout. Prints componentType and Id of the source and target Components, the bandwidth, load latency, and the attributes. For each attribute, the name and value are printed; the value is only retyped to uint64_t (so will print nonsensical values for other data types).

Reimplemented from sys_sage::Relation.

◆ SetBandwidth()

void sys_sage::DataPath::SetBandwidth ( double _bandwidth)

Sets the bandwidth from the source to the target.

Parameters
_bandwidthValue for bw
See also
bw

◆ SetLatency()

void sys_sage::DataPath::SetLatency ( double _latency)

Sets the data load latency from the source to the target.

Parameters
_latencyValue for latency
See also
latency

◆ UpdateSource()

int sys_sage::DataPath::UpdateSource ( Component * _new_source)

Updates the source of the DataPath. The datapath is removed from the outgoing/incoming vectors of the old source and added to the vectors of the new source.

Parameters
_new_sourceNew source of the DataPath.

◆ UpdateTarget()

int sys_sage::DataPath::UpdateTarget ( Component * _new_target)

Updates the target of the DataPath. The datapath is removed from the outgoing/incoming vectors of the old target and added to the vectors of the new target.

Parameters
_new_targetNew target of the DataPath.

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