From c94d0c347fdbd8acc774df4ac17617a3f63e4507 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 9 Jul 2017 23:48:06 +0200 Subject: Delete old codebase This change removes version 1 of the OpenDC simulator codebase as it will be replaced by a complete rewrite in the Kotlin language. --- Simulator/include/simulation/workloads/Workload.h | 101 ---------------------- 1 file changed, 101 deletions(-) delete mode 100644 Simulator/include/simulation/workloads/Workload.h (limited to 'Simulator/include/simulation/workloads/Workload.h') diff --git a/Simulator/include/simulation/workloads/Workload.h b/Simulator/include/simulation/workloads/Workload.h deleted file mode 100644 index 7e391d8d..00000000 --- a/Simulator/include/simulation/workloads/Workload.h +++ /dev/null @@ -1,101 +0,0 @@ -#pragma once -#include - -namespace Simulation -{ - /* - The Workload class models a workload. - */ - class Workload - { - public: - /* - Initializes the TOTAL_FLOPS and the remainingFlops to the size. - */ - Workload(int size, int startTick, int dbId, int traceId, int dependency, bool parallel); - - /* - Decreases the remainingFlops by the given amount. - */ - void doOperations(uint32_t opCount); - - /* - Returns the amount of operations left to do. - */ - uint32_t getRemainingOperations() const; - - /* - Returns the total amount of operations, including finished ones. - */ - uint32_t getTotalOperations() const; - - /* - Returns true if the workload has been finished. - */ - bool isFinished() const; - - /* - Returns the id of this workload. - */ - uint32_t getId() const; - - /* - Returns the dependency id of this workload. - */ - int getDependencyId() const; - - /** - * \return The start tick of this workload. - */ - uint32_t getStartTick() - { - return START_TICK; - } - - /** - * \brief Sets the coresUsed of this workload to the given number of cores. - */ - void setCoresUsed(uint32_t cores); - - /** - * \return Returns the number of cores used by this workload. - */ - uint32_t getCoresUsed(); - - /** - * \return Whether this workload can be spread across machines. - */ - bool isParallelizable(); - - // True if the dependency of this workload has finished. - bool dependencyFinished = false; - - private: - // The id of the workload this workload depends on. - int dependencyId; - - // Finished is true if the remainingFlops is 0. - bool finished = false; - - // The amount of operations done. - uint32_t remainingFlops; - - // The total amount of operations required to finish this task. - uint32_t TOTAL_FLOPS; - - // The tick during which this workload was started. - uint32_t START_TICK; - - // The id of this workload in the database - uint32_t ID; - - // The id of the trace this workload belongs to in the database. - uint32_t TRACE_ID; - - // The number of cores that this workload is occupying - uint32_t coresUsed = 0; - - // Whether this task can be parallelized across multiple machines. - bool isParallel = false; - }; -} -- cgit v1.2.3