Adds edges with properties to the graph. More...
Public Member Functions | |
add_edge_aggregator (Cont *pc, size_t max_msg_sz=16384) | |
size_t | target_location (element_type const &x) |
Overwrites the base target_location() method to return the location of the source of the edge instead of its target. | |
void | flush (void) |
void | flush (size_t i) |
void | local_flush (void) |
size_t | target_location (std::pair< Cont::edge_descriptor, Cont::edge_property > const &x) const |
Returns the ID of the location where the specified element is stored. More... | |
void | add (std::pair< Cont::edge_descriptor, Cont::edge_property > const &x) |
Adds an element to the aggregator. More... | |
void | add (std::pair< Cont::edge_descriptor, Cont::edge_property > const &x, size_t loc) |
Adds an element to the aggregator, when the target location is given. More... | |
Cont * | container (void) |
void | manual_destruct (void) |
Flush all queues that are not empty. | |
Public Types | |
using | element_type = std::pair< typename Cont::edge_descriptor, typename Cont::edge_property > |
using | base_type = aggregator_apply_impl< element_type, Cont, aggr_algo_detail::add_property_edge_wf, add_edge_aggregator< Cont, true > > |
Public Attributes | |
aggr_algo_detail::add_property_edge_wf | m_wf |
Protected Attributes | |
std::vector< std::vector< std::pair< Cont::edge_descriptor, Cont::edge_property > > > | m_send_queue |
Container for storing requests to each location. | |
std::vector< size_t > | m_loc_ids |
Container storing a random shuffling for all location-ids. Shuffling the location-ids provides better performance by easing network traffic. | |
Cont * | m_pc |
Pointer to the container where requests will be executed. | |
size_t | m_max_msg_aggregate_sz |
Maximum number of requests that will be aggregated. | |
size_t | m_loc_id |
The ID of this location. | |
Adds edges with properties to the graph.
Cont | The type of the container (graph). |
|
inherited |
Returns the ID of the location where the specified element is stored.
Derived classes may chose to overwrite this method to provide a suitable method to find what the element is. By default, the element GID is provided by the .target() method.
|
inherited |
Adds an element to the aggregator.
This will trigger a flush if the queue for the target location has exceeded the maximum message size.
|
inherited |
Adds an element to the aggregator, when the target location is given.
This will trigger a flush if the queue for the target location has exceeded the maximum message size.
x | The element to send. |
loc | The location to send the element to. |