STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions | Protected Attributes
stapl::executor< TaskGraph > Class Template Referenceabstract

Executor for scheduling runnable tasks with specific scheduling information. More...

Public Member Functions

template<typename Scheduler >
 executor (TaskGraph &tg, Scheduler &&s)
 
void notify_finished (void)
 Calls the notifier that informs that this executor has finished.
 
result_type populate (void) override
 Populates the executor with entries if there is a factory task. More...
 
result_type operator() (void) override
 Executes some entries.
 
void operator() (execute_all_t) override
 Executes all entries.
 
bool empty (void) override
 
scheduler_type const & scheduler (void) const noexcept
 
scheduler_type & scheduler (void) noexcept
 
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...
 

Public Types

using scheduler_type = typename TaskGraph::scheduler_type
 
using sched_info_type = typename scheduler_type::sched_info_type
 
using result_type = executor_base::result_type
 
enum  status_type { Active, Idle, Finished }
 Return values for function operator. More...
 

Protected Member Functions

void add_task_impl (runnable_base *t) override
 
void add_executor_impl (executor_base *, sched_info_type const &, const bool) override
 Adds an executor with the given scheduling information. More...
 
void add_executor_impl (executor_base *, sched_info_type &&, const bool) override
 Adds an executor with the given scheduling information. More...
 
void add_executor_impl (executor_base *, const bool) override
 Adds an executor without scheduling information. More...
 
void print (std::ostream &os) override
 Outputs information about this executor_base. More...
 
virtual void add_executor_impl (executor_base *, TaskGraph::scheduler_type::sched_info_type const &, const bool is_gang_executor)=0
 
virtual void add_executor_impl (executor_base *, TaskGraph::scheduler_type::sched_info_type &&, const bool is_gang_executor)=0
 
void notify_runnable (void)
 Signals that the executor is runnable.
 

Protected Attributes

runtime::bool_mutex m_executing
 

Detailed Description

template<typename TaskGraph>
class stapl::executor< TaskGraph >

Executor for scheduling runnable tasks with specific scheduling information.

Template Parameters
TaskGraphTask graph type.

Member Enumeration Documentation

◆ status_type

Return values for function operator.

Enumerator
Active 

Runnable object is active.

Idle 

Runnable object is idle.

Finished 

Runnable object has finished.

Member Function Documentation

◆ add_task_impl()

template<typename TaskGraph >
void stapl::executor< TaskGraph >::add_task_impl ( runnable_base t)
overrideprotectedvirtual

Implements stapl::executor_base.

◆ add_executor_impl() [1/3]

template<typename TaskGraph >
void stapl::executor< TaskGraph >::add_executor_impl ( executor_base ,
sched_info_type const &  ,
const bool   
)
overrideprotected

Adds an executor with the given scheduling information.

◆ add_executor_impl() [2/3]

template<typename TaskGraph >
void stapl::executor< TaskGraph >::add_executor_impl ( executor_base ,
sched_info_type &&  ,
const bool   
)
overrideprotected

Adds an executor with the given scheduling information.

◆ add_executor_impl() [3/3]

template<typename TaskGraph >
void stapl::executor< TaskGraph >::add_executor_impl ( executor_base ,
const bool   
)
overrideprotectedvirtual

Adds an executor without scheduling information.

Implements stapl::executor_base.

◆ print()

template<typename TaskGraph >
void stapl::executor< TaskGraph >::print ( std::ostream &  os)
overrideprotectedvirtual

Outputs information about this executor_base.

Implements stapl::executor_base.

◆ populate()

template<typename TaskGraph >
result_type stapl::executor< TaskGraph >::populate ( void  )
overridevirtual

Populates the executor with entries if there is a factory task.

Implements stapl::executor_base.

◆ add_executor()

void stapl::executor_base::add_executor ( executor_base ex,
const bool  is_gang_executor = false 
)
inherited

Adds an executor without scheduling information.


The documentation for this class was generated from the following file: