DPsim
|
Public Member Functions | |
ThreadLevelScheduler (Int threads=1, String outMeasurementFile=String(), String inMeasurementFile=String(), Bool useConditionVariables=false, Bool sortTaskTypes=false) | |
void | createSchedule (const CPS::Task::List &tasks, const Edges &inEdges, const Edges &outEdges) |
Creates the schedule for the given dependency graph. | |
![]() | |
ThreadScheduler (Int threads, String outMeasurementFile, Bool useConditionVariable) | |
void | step (Real time, Int timeStepCount) |
Performs a single simulation step. | |
virtual void | stop () |
Called on simulation stop to reliably clean up e.g. running helper threads. | |
![]() | |
Scheduler (CPS::Logger::Level logLevel=CPS::Logger::Level::off) | |
void | resolveDeps (CPS::Task::List &tasks, Edges &inEdges, Edges &outEdges) |
TaskTime | getAveragedMeasurement (CPS::Task::Ptr task) |
Additional Inherited Members | |
![]() | |
typedef std::unordered_map< CPS::Task::Ptr, std::deque< CPS::Task::Ptr > > | Edges |
typedef std::chrono::steady_clock::duration | TaskTime |
Time measurement for the task execution. | |
![]() | |
static CPS::AttributeBase::Ptr | external |
![]() | |
void | finishSchedule (const Edges &inEdges) |
void | scheduleTask (int thread, CPS::Task::Ptr task) |
![]() | |
void | topologicalSort (const CPS::Task::List &tasks, const Edges &inEdges, const Edges &outEdges, CPS::Task::List &sortedTasks) |
Simple topological sort, filtering out tasks that do not need to be executed. | |
void | initMeasurements (const CPS::Task::List &tasks) |
void | updateMeasurement (CPS::Task *task, TaskTime time) |
void | writeMeasurements (CPS::String filename) |
Write measurement data to file. | |
void | readMeasurements (CPS::String filename, std::unordered_map< CPS::String, TaskTime::rep > &measurements) |
Read measurement data from file to use it for the scheduling. | |
TaskTime | getAveragedMeasurement (CPS::Task *task) |
![]() | |
static void | levelSchedule (const CPS::Task::List &tasks, const Edges &inEdges, const Edges &outEdges, std::vector< CPS::Task::List > &levels) |
![]() | |
Int | mNumThreads |
![]() | |
CPS::Task::Ptr | mRoot |
CPS::Logger::Level | mLogLevel |
Log level. | |
CPS::Logger::Log | mSLog |
Logger. | |
Definition at line 14 of file ThreadLevelScheduler.h.
ThreadLevelScheduler::ThreadLevelScheduler | ( | Int | threads = 1, |
String | outMeasurementFile = String(), | ||
String | inMeasurementFile = String(), | ||
Bool | useConditionVariables = false, | ||
Bool | sortTaskTypes = false ) |
Definition at line 18 of file ThreadLevelScheduler.cpp.
|
virtual |
Creates the schedule for the given dependency graph.
Implements DPsim::Scheduler.
Definition at line 26 of file ThreadLevelScheduler.cpp.