Skip to content

Commit

Permalink
Final correction on TH computation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rojods committed Jun 28, 2024
1 parent 7404798 commit 541ea78
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ default double[] recomputeMaximumCycles(
// now add cycles created by the transmission of messages
for (int i = 0; i < numJobs; i++) {
var finalI = i;
maxCycles.put(i, Math.max(maxCycles.getOrDefault(i, 0.0), jobWeights[i] + IntStream.range(0, numJobs).mapToDouble(j -> edgeWeigths[finalI][j]).sum()));
maxCycles.put(i, Math.max(maxCycles.getOrDefault(i, 0.0), Math.max(jobWeights[i], IntStream.range(0, numJobs).mapToDouble(j -> edgeWeigths[finalI][j]).sum())));
}
// System.out.println("A maxCycles: " + maxCycles);
var mappedInspector = new ConnectivityInspector<>(mappingGraph);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ constraint forall(p, pp in Processes where p != pp) (processMapping[p] = process
constraint forall(p, pp in Processes where p != pp /\ connected[p, pp]) (invThroughput[p] = invThroughput[pp]);

constraint forall(a in Processes) (
invThroughput[a] >= duration[a] + sum(b in Buffers where processesWriteBuffer[a, b] > 0) (durationBufferMessage[b])
invThroughput[a] >= max([duration[a], sum(b in Buffers where processesWriteBuffer[a, b] > 0) (durationBufferMessage[b])])
);

constraint forall(f, ff in Firings where processMapping[firingsActor[f]] = processMapping[firingsActor[ff]] /\ f != ff) (
Expand Down
8 changes: 4 additions & 4 deletions rust-orchestration/src/exploration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ impl Iterator for MultiLevelCombinedExplorerIterator3 {
}
}
Err(std::sync::mpsc::RecvTimeoutError::Disconnected) => {
// let optimal = self.levels_status[i]
// .lock()
// .map(|x| *x == ExplorationStatus::Optimal)
// .unwrap_or(false);
let optimal = self.levels_status[i]
.lock()
.map(|x| *x == ExplorationStatus::Optimal)
.unwrap_or(false);
let all_optimal_finished = (0..self.levels_streams.len())
.filter(|i| self.levels_is_exact[*i])
.all(|i| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ final class CanSolveSDFToTiledMultiCore
val nJobs = jobs.size

for (i <- 0 until nJobs) {
maxCycles(i) = Math.max(maxCycles(i), jobWeight(i) + edgeWeight(i).sum)
maxCycles(i) = Math.max(maxCycles(i), Math.max(jobWeight(i), edgeWeight(i).sum))
}

val mappingGraph = DefaultDirectedGraph[(String, Int), DefaultEdge](classOf[DefaultEdge])
Expand Down

0 comments on commit 541ea78

Please sign in to comment.