Added InterRank variable for skip checking when phases are within the same rank.
This commit is contained in:
@@ -47,11 +47,20 @@
|
||||
#include "data/tracedb.h"
|
||||
#include "businessObjects/phases/phasedependency.h"
|
||||
|
||||
struct TimeDependency {
|
||||
class TimeDependency {
|
||||
public:
|
||||
TimeDependency() = default;
|
||||
TimeDependency(size_t timeValue, QString phaseDep, DependencyType depType,
|
||||
QString timeDepName, bool considerIntraRank = false)
|
||||
: timeValue{timeValue}, phaseDep{phaseDep}, depType{depType},
|
||||
timeDepName{timeDepName}, considerIntraRank{considerIntraRank} {}
|
||||
|
||||
size_t timeValue;
|
||||
QString phaseDep;
|
||||
DependencyType depType;
|
||||
QString timeDepName;
|
||||
bool considerIntraRank = false; // Used only for InterRank skip check in PhaseDependenciesTracker::mCalculateDependencies
|
||||
|
||||
};
|
||||
|
||||
struct PhaseTimeDependencies {
|
||||
|
||||
@@ -220,11 +220,21 @@ PhaseDependenciesTracker::mCalculateDependencies(const TraceDB& tdb, const std::
|
||||
for (const auto& dep : deps.dependencies) {
|
||||
if (dep.phaseDep != "NAW" && dep.phaseDep != otherPhase->phaseName) continue;
|
||||
|
||||
if (
|
||||
dep.depType == DependencyType::IntraBank && cmdBank != otherPhase->tBank
|
||||
|| dep.depType == DependencyType::IntraRank && cmdRank != otherPhase->tRank
|
||||
|| dep.depType == DependencyType::InterRank && cmdRank == otherPhase->tRank // TODO - is this last comparison correct? Check if this holds on all devices
|
||||
) {
|
||||
bool const skipOnIntraBankAndDifferentBanks = {
|
||||
dep.depType == DependencyType::IntraBank
|
||||
&& cmdBank != otherPhase->tBank
|
||||
};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraRank
|
||||
&& cmdRank != otherPhase->tRank
|
||||
};
|
||||
bool const skipOnInterRankAndSameRank = {
|
||||
dep.depType == DependencyType::InterRank
|
||||
&& cmdRank == otherPhase->tRank
|
||||
&& !dep.considerIntraRank
|
||||
};
|
||||
|
||||
if (skipOnIntraBankAndDifferentBanks || skipOnIntraRankAndDifferentRanks || skipOnInterRankAndSameRank) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user