Skip to content
Snippets Groups Projects

Added type argument to print_slacks_type and added tie-breaker for sort-y-times

Merged Simon Bjurek requested to merge print-slacks-type into master
1 file
+ 10
3
Compare changes
  • Side-by-side
  • Inline
+ 10
3
@@ -1089,10 +1089,17 @@ class Schedule:
move_y_location
set_y_location
"""
for i, graph_id in enumerate(
sorted(self._start_times, key=self._start_times.get)
):
def sort_key(graph_id):
op = self._sfg.find_by_id(graph_id)
return (
self._start_times[op.graph_id],
-self._sfg.find_by_id(graph_id).latency,
)
for i, graph_id in enumerate(sorted(self._start_times, key=sort_key)):
self.set_y_location(graph_id, i)
for graph_id in self._start_times:
op = cast(Operation, self._sfg.find_by_id(graph_id))
# Position Outputs and Sinks adjacent to the operation generating them
Loading