pelib
2.0.0
|
#include <Schedule.hpp>
Public Types | |
typedef std::pair< const Task *, double > | work |
typedef std::map< float, work > | sequence |
typedef std::map< int, sequence > | table |
Public Member Functions | |
Schedule (const std::string &name, const std::string &appName, const table &schedule) | |
Schedule (const std::string &name, const Algebra &algebra) | |
Schedule (const std::string &name, const std::string &appName, const Algebra &algebra) | |
Schedule (const Schedule &src) | |
virtual | ~Schedule () |
virtual Schedule * | clone () const |
virtual Algebra | buildAlgebra () const |
virtual std::string | getName () const |
virtual std::string | getAppName () const |
virtual const table & | getSchedule () const |
virtual const set< Task > & | getTasks () const |
virtual Schedule & | operator= (const Schedule &) |
virtual const set< const Task * > & | getTasks (int core) const |
virtual const Task & | getTask (int id) const |
multiset< const Task * > | getRemoteProducers (int core, const Taskgraph &tg, const Platform &pt) const |
multiset< const Task * > | getRemoteConsumers (int core, const Taskgraph &tg, const Platform &pt) const |
multiset< const Task * > | getRemoteTaskProducers (const Task &, const Taskgraph &tg, const Platform &pt) const |
multiset< const Task * > | getRemoteTaskConsumers (const Task &, const Taskgraph &tg, const Platform &pt) const |
multiset< const Link * > | getRemoteProducersLink (int core, const Taskgraph &tg, const Platform &pt) const |
multiset< const Link * > | getRemoteConsumersLink (int core, const Taskgraph &tg, const Platform &pt) const |
multimap< const Task *, const Link * > | getRemoteProducersTaskLink (int core, const Taskgraph &tg, const Platform &pt) const |
multimap< const Task *, const Link * > | getRemoteConsumersTaskLink (int core, const Taskgraph &tg, const Platform &pt) const |
virtual set< const Task * > | getTasksSharedMemoryIsland (const set< int > &islands, const Platform &pt) const |
virtual multiset< const Task * > | getRemoteSharedMemoryIslandProducers (const set< int > &islands, const Taskgraph &tg, const Platform &pt) const |
virtual multiset< const Task * > | getRemoteSharedMemoryIslandTaskProducers (const Task &t, const Taskgraph &tg, const Platform &pt) const |
virtual multiset< const Task * > | getRemoteSharedMemoryIslandConsumers (const set< int > &islands, const Taskgraph &tg, const Platform &pt) const |
virtual multiset< const Task * > | getRemoteSharedMemoryIslandTaskConsumers (const Task &t, const Taskgraph &tg, const Platform &pt) const |
virtual const set< int > | getCores (const Task &t) const |
Static Public Member Functions | |
static Algebra | addStartTime (const Algebra &data, const Taskgraph &tg, const Platform &platform) |
Protected Member Functions | |
virtual void | setSchedule (const table &) |
Protected Attributes | |
std::string | name |
std::string | appName |
table | schedule |
set< Task > | tasks |
std::map< int, set< const Task * > > | core_tasks |
Schedule of a streaming application
Definition at line 35 of file Schedule.hpp.
typedef std::map<float, work> pelib::Schedule::sequence |
Sequence of tasks to run for a processor
Definition at line 41 of file Schedule.hpp.
typedef std::map<int, sequence> pelib::Schedule::table |
Collection to task sequences, one element per core
Definition at line 43 of file Schedule.hpp.
typedef std::pair<const Task*, double> pelib::Schedule::work |
Models the workload portion of a task computed in a portion of time of a schedule
Definition at line 39 of file Schedule.hpp.
pelib::Schedule::Schedule | ( | const std::string & | name, |
const std::string & | appName, | ||
const table & | schedule | ||
) |
Constructor
name | name of the schedule. This is only for human-redability purpose |
appName | name of the application this schedule is designed for |
schedule | collection of task sequences to run by each processor in the schedule |
Definition at line 42 of file Schedule.cpp.
pelib::Schedule::Schedule | ( | const std::string & | name, |
const Algebra & | algebra | ||
) |
Constructor
algebra | Collection of AlgebraData descendant class instances that describes a schedule in an algebraic form, used as basis to build the Schedule class instance |
Definition at line 87 of file Schedule.cpp.
pelib::Schedule::Schedule | ( | const std::string & | name, |
const std::string & | appName, | ||
const Algebra & | algebra | ||
) |
Constructor
algebra | Collection of AlgebraData descendant class instances that describes a schedule in an algebraic form, used as basis to build the Schedule class instance |
Definition at line 92 of file Schedule.cpp.
pelib::Schedule::Schedule | ( | const Schedule & | src | ) |
Definition at line 97 of file Schedule.cpp.
pelib::Schedule::~Schedule | ( | ) | [virtual] |
Destructor
Definition at line 51 of file Schedule.cpp.
Algebra pelib::Schedule::addStartTime | ( | const Algebra & | data, |
const Taskgraph & | tg, | ||
const Platform & | platform | ||
) | [static] |
Computes the starting time of each task in a schedule and add this starting time to a copy of the algebraic form schedule
data | Schedule in algebraic form that lacks the starting time of tasks |
tg | Taskgraph that contains extended information about tasks |
platform | Platform description that matches the algebraic schedule |
Definition at line 745 of file Schedule.cpp.
Algebra pelib::Schedule::buildAlgebra | ( | ) | const [virtual] |
Generate an algebraic representation of this schedule
Definition at line 187 of file Schedule.cpp.
Schedule * pelib::Schedule::clone | ( | ) | const [virtual] |
Returns a pointer to a copy of this class instance
Implements pelib::Record.
Definition at line 179 of file Schedule.cpp.
std::string pelib::Schedule::getAppName | ( | ) | const [virtual] |
Returns the name of the application this schedule is generated for
Definition at line 252 of file Schedule.cpp.
const set< int > pelib::Schedule::getCores | ( | const Task & | t | ) | const [virtual] |
Returns the set of cores that execute a Task
t | Task that is run by the set of cores returned by the function |
Definition at line 719 of file Schedule.cpp.
std::string pelib::Schedule::getName | ( | ) | const [virtual] |
Returns the name of the schedule
Definition at line 246 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteConsumers | ( | int | core, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 480 of file Schedule.cpp.
multiset< const Link * > pelib::Schedule::getRemoteConsumersLink | ( | int | core, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 494 of file Schedule.cpp.
multimap< const Task *, const Link * > pelib::Schedule::getRemoteConsumersTaskLink | ( | int | core, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 528 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteProducers | ( | int | core, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 542 of file Schedule.cpp.
multiset< const Link * > pelib::Schedule::getRemoteProducersLink | ( | int | core, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 556 of file Schedule.cpp.
multimap< const Task *, const Link * > pelib::Schedule::getRemoteProducersTaskLink | ( | int | core, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 590 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteSharedMemoryIslandConsumers | ( | const set< int > & | islands, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const [virtual] |
Returns the set of Task that are mapped to other shared memory islands than the island collection given as parameter, and consume data produced by tasks mapped in the set of islands given as parameters
islands | Set of islands |
tg | Taskgraph that describe links between tasks |
pt | Platform description that defines shared memory islands |
Definition at line 604 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteSharedMemoryIslandProducers | ( | const set< int > & | islands, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const [virtual] |
Returns the set of Task that are mapped to other shared memory islands than the island collection given as parameter, and produce data consumed by tasks mapped in the set of islands given as parameters
islands | Set of islands |
tg | Taskgraph that describe links between tasks |
pt | Platform description that defines shared memory islands |
Definition at line 320 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteSharedMemoryIslandTaskConsumers | ( | const Task & | t, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const [virtual] |
Returns the set of Task that are mapped to another shared memory island than Task t, and consume data that Task t produces
t | Task for which this function computes the set of remote tasks that consume data from it |
tg | Taskgraph that defines the links between tasks |
pt | Platform that defines the core shared memory islands |
Definition at line 664 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteSharedMemoryIslandTaskProducers | ( | const Task & | t, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const [virtual] |
Returns the set of Task that are mapped to another shared memory island than Task t, and produce data that Task t consumes
t | Task for which this function computes the set of remote tasks that produce data for it. |
tg | Taskgraph that defines the links between tasks |
pt | Platform that defines the core shared memory islands |
Definition at line 379 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteTaskConsumers | ( | const Task & | t, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 434 of file Schedule.cpp.
multiset< const Task * > pelib::Schedule::getRemoteTaskProducers | ( | const Task & | t, |
const Taskgraph & | tg, | ||
const Platform & | pt | ||
) | const |
Definition at line 457 of file Schedule.cpp.
const Schedule::table & pelib::Schedule::getSchedule | ( | ) | const [virtual] |
Returns a C++ standard collection that hold processors' task sequences
Definition at line 258 of file Schedule.cpp.
const Task & pelib::Schedule::getTask | ( | int | id | ) | const [virtual] |
Returns the ith task in the Schedule tasks collection
id | Index of the task, starting from 1, to be read from the Schedule's internal collection of Task |
Definition at line 270 of file Schedule.cpp.
const set< Task > & pelib::Schedule::getTasks | ( | ) | const [virtual] |
Return the set of tasks scheduled in this class instance
Definition at line 264 of file Schedule.cpp.
const set< const Task * > & pelib::Schedule::getTasks | ( | int | core | ) | const [virtual] |
Returns the set of tasks run by a core identified by its number
core | Core number, starting from 1 |
Definition at line 291 of file Schedule.cpp.
set< const Task * > pelib::Schedule::getTasksSharedMemoryIsland | ( | const set< int > & | islands, |
const Platform & | pt | ||
) | const [virtual] |
Returns the tasks contained in a shared memory island, identified by the set of cores that forms this island.
islands | Set of core id (starting from 1) that form a shared memory island |
pt | Execution platform that corresponds to this schedule |
Definition at line 297 of file Schedule.cpp.
Flushes this schedule instance and copies an instance of Schedule in this instance
Definition at line 278 of file Schedule.cpp.
void pelib::Schedule::setSchedule | ( | const table & | schedule | ) | [protected, virtual] |
Set the schedule of this class instance from a collection of task sequences. This method duplicates the tasks so the Schedule instance owns all instances of Tasks that the schedule refers to
Definition at line 57 of file Schedule.cpp.
std::string pelib::Schedule::appName [protected] |
Definition at line 165 of file Schedule.hpp.
std::map<int, set<const Task*> > pelib::Schedule::core_tasks [protected] |
Definition at line 168 of file Schedule.hpp.
std::string pelib::Schedule::name [protected] |
Definition at line 165 of file Schedule.hpp.
table pelib::Schedule::schedule [protected] |
Definition at line 166 of file Schedule.hpp.
set<Task> pelib::Schedule::tasks [protected] |
Definition at line 167 of file Schedule.hpp.