RMI request aggregator to a destination location. More...
Public Member Functions | |
aggregator (context &ctx, full_location const &dest, gang_md &g, const bool intragang) noexcept | |
Creates a new aggregator to an intragang/intergang destination with the gang metadata being known. More... | |
aggregator (context &ctx, full_location const &dest) noexcept | |
Creates a new aggregator to an intergang destination. | |
~aggregator (void) | |
Destroys this aggregator. More... | |
bool | is_on_shmem (void) const noexcept |
Returns true if the destination is on shared memory, otherwise false . | |
void * | allocate (const std::size_t size, const epoch_type e, const bool implicit_flush) |
Allocates space for a new request. More... | |
std::pair< void *, void * > | allocate (rmi_delegate const &delegate, const std::size_t size, const std::size_t combined_size, const epoch_type e, const bool implicit_flush) |
Allocates space for a new request that supports combining. More... | |
void | flush (void) |
Flushes the buffer. | |
void | check_and_flush (void) |
Flushes the buffer if it has at least a request in it. | |
void | try_flush (void) |
Flushes the buffer if it has enough requests in it. More... | |
Public Types | |
using | epoch_type = logical_clock::time_type |
RMI request aggregator to a destination location.
This class keeps an internal buffer where requests are aggregated and then sent using one message.
If STAPL_RUNTIME_DISABLE_COMBINING is not defined, it holds additional information for combining requests (
|
noexcept |
Creates a new aggregator to an intragang/intergang destination with the gang metadata being known.
If it is an intergang aggregator, then the reference count on gang_md is increased to avoid deleting the gang_md object in case that it is ready to be destroyed.
stapl::runtime::context_impl::aggregator::~aggregator | ( | void | ) |
Destroys this aggregator.
The destructor flushes the buffer if necessary and releases the reference count on gang_md if it was an intergang aggegrator.
void* stapl::runtime::context_impl::aggregator::allocate | ( | const std::size_t | size, |
const epoch_type | e, | ||
const bool | implicit_flush | ||
) |
Allocates space for a new request.
It will flush any aggregated requests if the new request is in a newer epoch than the last one or if there is not enough space for it.
std::pair<void*, void*> stapl::runtime::context_impl::aggregator::allocate | ( | rmi_delegate const & | delegate, |
const std::size_t | size, | ||
const std::size_t | combined_size, | ||
const epoch_type | e, | ||
const bool | implicit_flush | ||
) |
Allocates space for a new request that supports combining.
It will flush any aggregated requests if the new request is in a newer epoch than the last one or if there is not enough space for it.
void stapl::runtime::context_impl::aggregator::try_flush | ( | void | ) |
Flushes the buffer if it has enough requests in it.