summaryrefslogtreecommitdiff
path: root/Simulator/src/simulation/workloads/Workload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Simulator/src/simulation/workloads/Workload.cpp')
-rw-r--r--Simulator/src/simulation/workloads/Workload.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/Simulator/src/simulation/workloads/Workload.cpp b/Simulator/src/simulation/workloads/Workload.cpp
deleted file mode 100644
index f8fe1444..00000000
--- a/Simulator/src/simulation/workloads/Workload.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-#include "simulation/workloads/Workload.h"
-
-namespace Simulation
-{
- Workload::Workload(int size, int startTick, int dbId, int traceId, int dependency, bool parallel) : dependencyId(dependency), remainingFlops(size), TOTAL_FLOPS(size), START_TICK(startTick), ID(dbId), TRACE_ID(traceId), isParallel(parallel) {}
-
- void Workload::doOperations(uint32_t opCount)
- {
- if (opCount < 0 || finished) return;
-
- if (remainingFlops <= opCount)
- {
- remainingFlops = 0;
- finished = true;
- }
- else
- {
- remainingFlops -= opCount;
- }
- }
-
- uint32_t Workload::getRemainingOperations() const
- {
- return remainingFlops;
- }
-
- uint32_t Workload::getTotalOperations() const
- {
- return TOTAL_FLOPS;
- }
-
- bool Workload::isFinished() const
- {
- return this->finished;
- }
- uint32_t Workload::getId() const
- {
- return ID;
- }
-
- int Workload::getDependencyId() const
- {
- return this->dependencyId;
- }
-
- void Workload::setCoresUsed(uint32_t cores)
- {
- this->coresUsed = cores;
- }
-
- uint32_t Workload::getCoresUsed()
- {
- return coresUsed;
- }
-
- bool Workload::isParallelizable()
- {
- return isParallel;
- }
-}