diff options
| author | Matthijs Bijman <matthijs@bijman.org> | 2017-02-27 15:19:15 +0100 |
|---|---|---|
| committer | Matthijs Bijman <matthijs@bijman.org> | 2017-02-27 15:19:15 +0100 |
| commit | 34aaaad34e72c921ea72d7b023e5a5270e76dd40 (patch) | |
| tree | 64c65d557c5323a23f4ce6f31b20da744d44badb /Simulator/src/database | |
| parent | cc5c5a7eac0ebcf97c283e1e0dd1674c855a261a (diff) | |
Add tasks that run on 1 machine
Diffstat (limited to 'Simulator/src/database')
| -rw-r--r-- | Simulator/src/database/Database.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
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<QueryResult<int, int, int, int, int>> tasks; + std::vector<QueryResult<int, int, int, int, int, std::string>> tasks; // Fetch tasks from database { // Retrieves the traceId corresponding to the simulation section @@ -272,7 +272,7 @@ namespace Database .get<int, 0>(); // Retrieves the tasks that belong to the traceId - QueryExecuter<int, int, int, int, int> q2(db); + QueryExecuter<int, int, int, int, int, std::string> q2(db); tasks = q2 .setQuery(Queries::GET_TASKS_OF_TRACE) .bindParams<int>(traceId) @@ -287,9 +287,15 @@ namespace Database int totalFlopCount = row.get<int, 2>(); int traceId = row.get<int, 3>(); int dependency = row.get<int, 4>(); + std::string parallelizability = row.get<std::string, 5>(); + 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; |
