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

Runqueue shared among locations of a gang that are on the same process. More...

Classes

class  impl
 Shared runqueue implementation. More...
 

Public Member Functions

 shared_runqueue (void)
 Constructs a runqueue for a single location.
 
 shared_runqueue (const location_id first, const size_type n=1)
 Constructs a runqueue for n location ids that start from first.
 
 shared_runqueue (shared_runqueue const &other)
 Constructs a runqueue based on the metadata of other.
 
 shared_runqueue (location_id_range const &r)
 Constructs a runqueue based on the range r.
 
 shared_runqueue (gang_description const &gd, const process_id pid)
 Constructs a runqueue from gd for process pid.
 
std::unique_lock< std::mutex > acquire (gang_md &g)
 Acquires the runqueue associated with g. More...
 
implget_impl (void) noexcept
 
size_type size (void) const noexcept
 

Public Types

using size_type = std::size_t
 
using location_id_range = any_range< location_id >
 

Detailed Description

Runqueue shared among locations of a gang that are on the same process.

Member Function Documentation

◆ acquire()

std::unique_lock< std::mutex > stapl::runtime::shared_runqueue::acquire ( gang_md g)

Acquires the runqueue associated with g.

Warning
This is a potential contention point as the lock in the deferred requests queue can only be held by one thread at a time.
Returns
An acquired lock that protects the queue of deferred requests and should only be released when gang metadata g is registered.

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