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_type & | get_slot (const id i) noexcept |
Public Types | |
using | id = location_id |
using | slot_type = request_queue |
using | size_type = std::size_t |
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]
.
void stapl::runtime::array_mailbox::push_any | ( | message_ptr | m | ) |
Pushes the request to any slot.
void stapl::runtime::array_mailbox::push_all | ( | const bool | , |
message_ptr | m | ||
) |
Pushes the request to all slots.
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
.