From 34aaaad34e72c921ea72d7b023e5a5270e76dd40 Mon Sep 17 00:00:00 2001 From: Matthijs Bijman Date: Mon, 27 Feb 2017 15:19:15 +0100 Subject: Add tasks that run on 1 machine --- Simulator/src/database/Database.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Simulator/src/database') diff --git a/Simulator/src/database/Database.cpp b/Simulator/src/database/Database.cpp index 5abee41e..d1bb2af5 100644 --- a/Simulator/src/database/Database.cpp +++ b/Simulator/src/database/Database.cpp @@ -260,7 +260,7 @@ namespace Database { Simulation::WorkloadPool pool; - std::vector> tasks; + std::vector> tasks; // Fetch tasks from database { // Retrieves the traceId corresponding to the simulation section @@ -272,7 +272,7 @@ namespace Database .get(); // Retrieves the tasks that belong to the traceId - QueryExecuter q2(db); + QueryExecuter q2(db); tasks = q2 .setQuery(Queries::GET_TASKS_OF_TRACE) .bindParams(traceId) @@ -287,9 +287,15 @@ namespace Database int totalFlopCount = row.get(); int traceId = row.get(); int dependency = row.get(); + std::string parallelizability = row.get(); + bool parallel = false; + if (parallelizability == "PARALLEL") + { + parallel = true; + } // TODO possibly wait and batch? - Simulation::Workload workload(totalFlopCount, startTick, id, traceId, dependency); + Simulation::Workload workload(totalFlopCount, startTick, id, traceId, dependency, parallel); if(dependency == 0) workload.dependencyFinished = true; -- cgit v1.2.3