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 | Friends
stapl::executor_base Class Referenceabstract

Executor base class. More...

Public Member Functions

 executor_base (executor_base const &)=delete
 
executor_baseoperator= (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 &)
 

Detailed Description

Executor base class.

See also
executor, gang_executor

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()

virtual void stapl::executor_base::add_task_impl ( runnable_base )
protectedpure virtual

◆ add_executor_impl()

virtual void stapl::executor_base::add_executor_impl ( executor_base ,
const bool  is_gang_executor 
)
protectedpure virtual

Adds an executor without scheduling information.

Implemented in stapl::gang_executor< Scheduler >, and stapl::executor< TaskGraph >.

◆ add_executor()

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

Adds an executor without scheduling information.

◆ populate()

virtual result_type stapl::executor_base::populate ( void  )
pure virtual

Populates the executor with entries.

Returns
Status of the executor.

Implemented in stapl::gang_executor< Scheduler >, and stapl::executor< TaskGraph >.


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