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

RMI request aggregator for a single destination location. More...

Public Member Functions

 tunnel_aggregator (context &ctx, full_location const &dest, gang_md &g, const bool intragang) noexcept
 Creates a new tunnel_aggregator to an intragang/intergang destination with the gang metadata being known. More...
 
 tunnel_aggregator (context &ctx, full_location const &dest) noexcept
 Creates a new tunnel_aggregator to an intergang destination.
 
 ~tunnel_aggregator (void)
 Destroys this tunnel_aggregator. More...
 
bool is_on_shmem (void) const noexcept
 Returns true if the destination is on shared memory, otherwise false.
 
std::pair< void *, void * > allocate (const std::size_t size, const std::size_t combined_size, const epoch_type e)
 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
 

Detailed Description

RMI request aggregator for a single destination location.

This class keeps an internal buffer where requests are stored and then sent as one message.

Constructor & Destructor Documentation

◆ tunnel_aggregator()

stapl::runtime::tunnel_aggregator::tunnel_aggregator ( context ctx,
full_location const &  dest,
gang_md g,
const bool  intragang 
)
noexcept

Creates a new tunnel_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.

◆ ~tunnel_aggregator()

stapl::runtime::tunnel_aggregator::~tunnel_aggregator ( void  )

Destroys this tunnel_aggregator.

The destructor flushes the buffer if necessary and releases the reference count on gang_md if it was an intergang aggegrator.

Member Function Documentation

◆ allocate()

std::pair<void*, void*> stapl::runtime::tunnel_aggregator::allocate ( const std::size_t  size,
const std::size_t  combined_size,
const epoch_type  e 
)

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.

Returns
The request that is used to combine the current one and a pointer to available space.

◆ try_flush()

void stapl::runtime::tunnel_aggregator::try_flush ( void  )

Flushes the buffer if it has enough requests in it.

See also
get_aggregation()

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