STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Friends
stapl::circular_lifeline_steal Class Reference

Steal in a circular way (always advance to the right neighbor of the last victim stealing policy. Avoids stealing from the same location if it didn't have anything the last time. More...

Public Member Functions

 circular_lifeline_steal (location_type id, location_type, size_type chunk_size=1, size_type fraction=2) noexcept
 Constructs a new circular_lifeline_steal object. More...
 
template<typename Scheduler >
void steal (Scheduler &scheduler)
 Steal some work. More...
 
void receive_steal_completion (location_type, size_type loot) noexcept
 Receive notification of a steal request completion.
 
template<typename Scheduler >
bool has_work (Scheduler const &scheduler) const noexcept
 Returns true if the scheduler has available work to be stolen.
 
template<typename Scheduler >
void process_steal_requests (Scheduler &scheduler, task_graph *tg_ptr)
 Processes steal requests that it got from thieves. More...
 
template<typename Scheduler >
void migrate_work (Scheduler &scheduler, location_type loc, size_type num_to_migrate, task_graph *tg_ptr)
 Migrate some work to a thief. More...
 
int expected_work (void) const noexcept
 
void receive_work_notification (void) noexcept
 Receive notification of a received work request.
 
void receive_steal_completion (const size_type loot) noexcept
 Receive notification of a steal request completion.
 

Public Types

typedef std::size_t size_type
 

Friends

std::ostream & operator<< (std::ostream &os, circular_lifeline_steal const &p)
 

Detailed Description

Steal in a circular way (always advance to the right neighbor of the last victim stealing policy. Avoids stealing from the same location if it didn't have anything the last time.

Constructor & Destructor Documentation

◆ circular_lifeline_steal()

stapl::circular_lifeline_steal::circular_lifeline_steal ( location_type  id,
location_type  ,
size_type  chunk_size = 1,
size_type  fraction = 2 
)
noexcept

Constructs a new circular_lifeline_steal object.

Parameters
idCurrent location id.
chunk_sizeNumber of entries to steal.
fractionFraction of the total entries to steal.

Member Function Documentation

◆ steal()

template<typename Scheduler >
void stapl::circular_lifeline_steal::steal ( Scheduler &  scheduler)

Steal some work.

Parameters
schedulerScheduler to steal entries from.

◆ process_steal_requests()

template<typename Scheduler >
void stapl::steal_policy_base::process_steal_requests ( Scheduler &  scheduler,
task_graph tg_ptr 
)
inherited

Processes steal requests that it got from thieves.

This function migrates work to the thieves. It will distribute work according to the steal requests that were received.

◆ migrate_work()

template<typename Scheduler >
void stapl::steal_policy_base::migrate_work ( Scheduler &  scheduler,
location_type  loc,
size_type  num_to_migrate,
task_graph tg_ptr 
)
inherited

Migrate some work to a thief.

Parameters
schedulerScheduler to migrate work from.
locThief to migrate work to.
num_to_migrateHow much work to migrate.

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