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

Mailbox for multiple threads that are contiguously numbered. More...

Public Member Functions

 array_mailbox (const size_type offset, const size_type n)
 
 array_mailbox (array_mailbox const &other)
 
size_type size (void) const noexcept
 
void push (const id i, message_ptr m)
 Pushes the request to slot with id i.
 
void push_any (message_ptr m)
 Pushes the request to any slot. More...
 
void push_all (const bool, message_ptr m)
 Pushes the request to all slots. More...
 
template<typename Range >
void push_range (Range const &r, const bool, message_ptr m)
 Pushes the request to the subset of slots with ids in r. More...
 
slot_typeget_slot (const id i) noexcept
 

Public Types

using id = location_id
 
using slot_type = request_queue
 
using size_type = std::size_t
 

Detailed Description

Mailbox for multiple threads that are contiguously numbered.

It is a data structure that keeps requests that go to each thread and offers the ability to place a request to multiple threads.

This implementation is based on an array and therefore can accept indexes in the range [offset, ... , offset + nthreads - 1].

Member Function Documentation

◆ push_any()

void stapl::runtime::array_mailbox::push_any ( message_ptr  m)

Pushes the request to any slot.

◆ push_all()

void stapl::runtime::array_mailbox::push_all ( const bool  ,
message_ptr  m 
)

Pushes the request to all slots.

◆ push_range()

template<typename Range >
void stapl::runtime::array_mailbox::push_range ( Range const &  r,
const bool  ,
message_ptr  m 
)

Pushes the request to the subset of slots with ids in r.


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