Executor base class. More...
Public Member Functions | |
executor_base (executor_base const &)=delete | |
executor_base & | operator= (executor_base const &)=delete |
bool | is_bound (void) const noexcept |
Returns true if this executor is inserted to another executor. | |
void | bind_to (const runtime::gang_id gid) |
Binds this executor to the executor of gid . | |
template<typename RunnableFunction , typename FinishedFunction > | |
void | set_notifiers (RunnableFunction &&rf, chunker::entry_type &entry, FinishedFunction &&ff) |
Sets the notifiers to be called when the executor becomes runnable or has finished execution and associates it with a chunker entry. | |
void | retire_chunker_entry (void) noexcept |
Retires the chunker entry associated with this executor. | |
bool | idle (void) const noexcept |
Returns true if the executor is processing entries. | |
void | add_task (runnable_base *t) |
Adds a task without scheduling information. | |
template<typename SchedInfo > | |
void | add_executor (executor_base *, SchedInfo &&, const bool is_gang_executor=false) |
Adds an executor with the given scheduling information. | |
void | add_executor (executor_base *ex, none_t, const bool is_gang_executor=false) |
Adds an executor without scheduling information. | |
void | add_executor (executor_base *ex, const bool is_gang_executor=false) |
Adds an executor without scheduling information. More... | |
virtual result_type | populate (void)=0 |
Populates the executor with entries. More... | |
virtual result_type | operator() (void)=0 |
Executes some entries. | |
virtual void | operator() (execute_all_t)=0 |
Executes all entries. | |
virtual bool | empty (void)=0 |
Public Types | |
using | result_type = runnable_base::status_type |
enum | status_type { Active, Idle, Finished } |
Return values for function operator. More... | |
Protected Member Functions | |
void | notify_runnable (void) |
Signals that the executor is runnable. | |
void | notify_finished (void) |
Signals that the executor has finished. | |
virtual void | add_task_impl (runnable_base *)=0 |
virtual void | add_executor_impl (executor_base *, const bool is_gang_executor)=0 |
Adds an executor without scheduling information. More... | |
virtual void | print (std::ostream &)=0 |
Outputs information about this executor_base. | |
Protected Attributes | |
runtime::bool_mutex | m_executing |
Friends | |
std::ostream & | operator<< (std::ostream &, executor_base &) |
Executor base class.
|
inherited |
|
protectedpure virtual |
Implemented in stapl::gang_executor< Scheduler >, and stapl::executor< TaskGraph >.
|
protectedpure virtual |
Adds an executor without scheduling information.
Implemented in stapl::gang_executor< Scheduler >, and stapl::executor< TaskGraph >.
void stapl::executor_base::add_executor | ( | executor_base * | ex, |
const bool | is_gang_executor = false |
||
) |
Adds an executor without scheduling information.
|
pure virtual |
Populates the executor with entries.
Implemented in stapl::gang_executor< Scheduler >, and stapl::executor< TaskGraph >.