@@ -61,7 +61,7 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
6161 std::vector<double > priorities;
6262 std::vector<std::vector<std::deque<VertexIdx>>> procList = CreateSuperstepLists (schedule, priorities);
6363 std::vector<std::vector<CostType>> workRemainingProcSuperstep (schedule.GetInstance ().NumberOfProcessors (),
64- std::vector<CostType>(schedule.NumberOfSupersteps (), 0 ));
64+ std::vector<CostType>(schedule.NumberOfSupersteps (), 0 ));
6565 std::vector<VertexIdx> nodesRemainingSuperstep (schedule.NumberOfSupersteps (), 0 );
6666
6767 MaxBspScheduleCS<GraphT> scheduleMax (schedule.GetInstance ());
@@ -73,9 +73,9 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
7373 }
7474
7575 std::vector<std::vector<CostType>> sendCommRemainingProcSuperstep (schedule.GetInstance ().NumberOfProcessors (),
76- std::vector<CostType>(schedule.NumberOfSupersteps (), 0 ));
77- std::vector<std::vector<CostType>> recCommRemainingProcSuperstep (schedule.GetInstance ().NumberOfProcessors (),
7876 std::vector<CostType>(schedule.NumberOfSupersteps (), 0 ));
77+ std::vector<std::vector<CostType>> recCommRemainingProcSuperstep (schedule.GetInstance ().NumberOfProcessors (),
78+ std::vector<CostType>(schedule.NumberOfSupersteps (), 0 ));
7979
8080 std::vector<std::set<std::pair<KeyTriple, unsigned >>> freeCommStepsForSuperstep (schedule.NumberOfSupersteps ());
8181 std::vector<std::vector<std::pair<KeyTriple, unsigned >>> dependentCommStepsForNode (schedule.GetInstance ().NumberOfVertices ());
@@ -84,7 +84,7 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
8484 dependentCommStepsForNode[std::get<0 >(key)].emplace_back (key, val);
8585
8686 CostType commCost = dag.VertexCommWeight (std::get<0 >(key))
87- * schedule.GetInstance ().GetArchitecture ().SendCosts (std::get<1 >(key), std::get<2 >(key));
87+ * schedule.GetInstance ().GetArchitecture ().SendCosts (std::get<1 >(key), std::get<2 >(key));
8888 sendCommRemainingProcSuperstep[std::get<1 >(key)][val] += commCost;
8989 recCommRemainingProcSuperstep[std::get<2 >(key)][val] += commCost;
9090 } else {
@@ -156,8 +156,8 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
156156 for (const std::pair<KeyTriple, unsigned > &entry : dependentCommStepsForNode[node]) {
157157 newlyFreedCommSteps.push_back (entry);
158158 CostType commCost = dag.VertexCommWeight (node)
159- * schedule.GetInstance ().GetArchitecture ().SendCosts (std::get<1 >(entry.first ),
160- std::get<2 >(entry.first ));
159+ * schedule.GetInstance ().GetArchitecture ().SendCosts (std::get<1 >(entry.first ),
160+ std::get<2 >(entry.first ));
161161 sendSumOfNewlyFreeOnProc[std::get<1 >(entry.first )] += commCost;
162162 recSumOfNewlyFreeOnProc[std::get<2 >(entry.first )] += commCost;
163163 }
@@ -194,10 +194,10 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
194194 maxWorkRemaining = std::max (maxWorkRemaining, workRemainingProcSuperstep[proc][step]);
195195 maxCommRemaining = std::max (maxCommRemaining, sendCommRemainingProcSuperstep[proc][step]);
196196 maxCommRemaining = std::max (maxCommRemaining, recCommRemainingProcSuperstep[proc][step]);
197- commAfterReduction = std::max (
198- commAfterReduction, sendCommRemainingProcSuperstep[proc][step] - sendSumOfNewlyFreeOnProc[proc]);
199- commAfterReduction = std::max (
200- commAfterReduction, recCommRemainingProcSuperstep[proc][step] - recSumOfNewlyFreeOnProc[proc]);
197+ commAfterReduction
198+ = std::max ( commAfterReduction, sendCommRemainingProcSuperstep[proc][step] - sendSumOfNewlyFreeOnProc[proc]);
199+ commAfterReduction
200+ = std::max ( commAfterReduction, recCommRemainingProcSuperstep[proc][step] - recSumOfNewlyFreeOnProc[proc]);
201201 }
202202 CostType commReduction
203203 = (maxCommRemaining - commAfterReduction) * schedule.GetInstance ().GetArchitecture ().CommunicationCosts ();
@@ -219,8 +219,8 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
219219 freeCommStepsForSuperstep[step].insert (entry);
220220
221221 CostType commCost = dag.VertexCommWeight (std::get<0 >(entry.first ))
222- * schedule.GetInstance ().GetArchitecture ().SendCosts (std::get<1 >(entry.first ),
223- std::get<2 >(entry.first ));
222+ * schedule.GetInstance ().GetArchitecture ().SendCosts (std::get<1 >(entry.first ),
223+ std::get<2 >(entry.first ));
224224 sendCommRemainingProcSuperstep[std::get<1 >(entry.first )][step] -= commCost;
225225 recCommRemainingProcSuperstep[std::get<2 >(entry.first )][step] -= commCost;
226226 }
@@ -290,7 +290,7 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
290290
291291 CostType workLimit = maxCommAfter;
292292 if (maxCommTogether + maxWorkDone <= maxCommAfter + std::max (maxWorkDone, maxCommCurrent)
293- + schedule.GetInstance ().GetArchitecture ().SynchronisationCosts ()) {
293+ + schedule.GetInstance ().GetArchitecture ().SynchronisationCosts ()) {
294294 workLimit = maxCommTogether;
295295 for (const std::pair<KeyTriple, unsigned > &entry : commInCurrentStep) {
296296 if (currentStep - 1 >= scheduleMax.NumberOfSupersteps ()) {
@@ -323,8 +323,7 @@ MaxBspScheduleCS<GraphT> GreedyBspToMaxBspConverter<GraphT>::Convert(const BspSc
323323 }
324324
325325 if (schedule.AssignedProcessor (node) == schedule.AssignedProcessor (parent)
326- && schedule.AssignedSuperstep (parent) == step + 1
327- && broughtForward.find (parent) == broughtForward.end ()) {
326+ && schedule.AssignedSuperstep (parent) == step + 1 && broughtForward.find (parent) == broughtForward.end ()) {
328327 hasDependency = true ;
329328 }
330329 }
0 commit comments