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::gang_executor< Scheduler > Class Template Reference

Gang associated executor. More...

Public Member Functions

 gang_executor (runtime::location_md &l)
 
 gang_executor (runtime::location_md &l, Scheduler &&scheduler)
 
result_type populate (void) noexcept override
 gang_executor objects do not get populated by any of the entries. This function is here to enforce interface compatibility.
 
result_type operator() (void) override
 Executes some entries.
 
void operator() (execute_all_t) override
 Executes all entries.
 
bool empty (void) noexcept override
 
runtime::location_md const & get_location_md (void) const noexcept
 
runtime::location_mdget_location_md (void) noexcept
 
scheduler_type const & get_scheduler (void) const noexcept
 
scheduler_type & get_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 = Scheduler
 
using sched_info_type = default_info
 
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 *) override
 
void add_executor_impl (executor_base *ex, sched_info_type const &sched_info, const bool is_gang_executor) override
 Adds an executor with the given scheduling information. More...
 
void add_executor_impl (executor_base *ex, sched_info_type &&sched_info, const bool is_gang_executor) override
 Adds an executor with the given scheduling information. More...
 
void add_executor_impl (executor_base *ex, const bool is_gang_executor) override
 Adds an executor without scheduling information. More...
 
void print (std::ostream &os) override
 Outputs information about this executor_base. More...
 
void notify_runnable (void)
 Signals that the executor is runnable.
 
void notify_finished (void)
 Signals that the executor has finished.
 

Protected Attributes

runtime::bool_mutex m_executing
 

Detailed Description

template<typename Scheduler>
class stapl::gang_executor< Scheduler >

Gang associated executor.

Schedules executor objects from PARAGRAPHs and gang_executor objects from child parallel sections.

Warning
Scheduler::entry_type has to provide a function is_linked().

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 Scheduler >
void stapl::gang_executor< Scheduler >::add_task_impl ( runnable_base )
overrideprotectedvirtual

Implements stapl::executor_base.

◆ add_executor_impl() [1/3]

template<typename Scheduler >
void stapl::gang_executor< Scheduler >::add_executor_impl ( executor_base ex,
sched_info_type const &  sched_info,
const bool  is_gang_executor 
)
overrideprotectedvirtual

Adds an executor with the given scheduling information.

Implements stapl::runtime::executor_intermediate< default_info >.

◆ add_executor_impl() [2/3]

template<typename Scheduler >
void stapl::gang_executor< Scheduler >::add_executor_impl ( executor_base ex,
sched_info_type &&  sched_info,
const bool  is_gang_executor 
)
overrideprotectedvirtual

Adds an executor with the given scheduling information.

Implements stapl::runtime::executor_intermediate< default_info >.

◆ add_executor_impl() [3/3]

template<typename Scheduler >
void stapl::gang_executor< Scheduler >::add_executor_impl ( executor_base ex,
const bool  is_gang_executor 
)
overrideprotectedvirtual

Adds an executor without scheduling information.

Implements stapl::executor_base.

◆ print()

template<typename Scheduler >
void stapl::gang_executor< Scheduler >::print ( std::ostream &  os)
overrideprotectedvirtual

Outputs information about this executor_base.

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: