Skip to content

Commit

Permalink
fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanvanecek committed Sep 9, 2022
1 parent 7e92778 commit fd4f5af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/DataPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DataPath* NewDataPath(Component* _source, Component* _target, int _oriented, dou
DataPath* NewDataPath(Component* _source, Component* _target, int _oriented, int _type, double _bw, double _latency)
{
DataPath* p = new DataPath(_source, _target, _oriented, _type, _bw, _latency);
return p;
}

Component * DataPath::GetSource() {return source;}
Expand All @@ -18,7 +19,9 @@ double DataPath::GetLatency() {return latency;}
int DataPath::GetDpType() {return dp_type;}
int DataPath::GetOriented() {return oriented;}

DataPath::DataPath(Component* _source, Component* _target, int _oriented, int _type): source(_source), target(_target), oriented(_oriented), dp_type(_type)
DataPath::DataPath(Component* _source, Component* _target, int _oriented, int _type): DataPath(_source, _target, _oriented, _type, 0, 0) {}
DataPath::DataPath(Component* _source, Component* _target, int _oriented, double _bw, double _latency): DataPath(_source, _target, _oriented, SYS_SAGE_DATAPATH_TYPE_NONE, _bw, _latency) {}
DataPath::DataPath(Component* _source, Component* _target, int _oriented, int _type, double _bw, double _latency): source(_source), target(_target), oriented(_oriented), dp_type(_type), bw(_bw), latency(_latency)
{
if(_oriented == SYS_SAGE_DATAPATH_BIDIRECTIONAL)
{
Expand All @@ -38,8 +41,6 @@ DataPath::DataPath(Component* _source, Component* _target, int _oriented, int _t
return;//error
}
}
DataPath::DataPath(Component* _source, Component* _target, int _oriented, double _bw, double _latency): DataPath(_source, _target, _oriented, SYS_SAGE_DATAPATH_TYPE_NONE), bw(_bw), latency(_latency) {}
DataPath::DataPath(Component* _source, Component* _target, int _oriented, int _type, double _bw, double _latency): DataPath(_source, _target, _oriented, _type), bw(_bw), latency(_latency) {}

void DataPath::Print()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Topology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ void Component::PrintAllDataPathsInSubtree()
vector<DataPath*>* dp_out = c->GetDataPaths(SYS_SAGE_DATAPATH_OUTGOING);
if(dp_in->size() > 0 || dp_out->size() > 0 )
{
cout << "DataPaths regarding Component (" << (*it)->GetComponentTypeStr() << ") id " << (*it)->GetId() << endl;
for(DataPath * dp : dp_out)
cout << "DataPaths regarding Component (" << c->GetComponentTypeStr() << ") id " << c->GetId() << endl;
for(DataPath * dp : *dp_out)
{
cout << " ";
dp->Print();
}
for(DataPath * dp : dp_in)
for(DataPath * dp : *dp_in)
{
cout << " ";
dp->Print();
Expand Down
2 changes: 1 addition & 1 deletion src/Topology.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class Memory : public Component {
Memory();
private:
long long size; /**< size/capacity of the memory element*/
boolean is_volatile; /**< is volatile? */
bool is_volatile; /**< is volatile? */
};

/**
Expand Down

0 comments on commit fd4f5af

Please sign in to comment.