![]() |
fpmas 1.6
|
#include <distributed_edge.h>
Public Member Functions | |
virtual DistributedId | getId () const =0 |
virtual int | getLocation () const =0 |
virtual DistributedNode< T > * | build ()=0 |
TemporaryNode API.
A temporary node can be used to optimize DistributedEdge deserialization. Indeed, when a node is imported in a DistributedGraph for example, at least the source or target DistributedNode should already be contained in the graph. In consequence, at least source or target node of the imported edge will not be used before being discarded and replaced by a local DistributedNode: deserializing and allocating such nodes can represent a huge waste of time and memory resources (what has been observed experimentally).
This can be solved storing temporary source and target nodes has TemporaryNodes in a deserialized DistributedEdge. If a temporary node is finally useless, there is no need to deserialize it or to allocate it, and the TemporaryNode is simply discarded without any useless memory usage. If the temporary node is required (for example, because it is not already contained in the graph), is can be deserialized and allocated only when required using the build() method.
T | node data type |
|
pure virtual |
Gets the id of the node represented by the TemporaryNode.
This should not require the complete node deserialization and allocation.
Implemented in fpmas::graph::TemporaryNode< T, PackType >.
|
pure virtual |
Gets the processor rank where the node represented by the TemporaryNode is located.
Implemented in fpmas::graph::TemporaryNode< T, PackType >.
|
pure virtual |
Desesializes (if required) and allocates the DistributedNode represented by this temporary node and returns it.
The node ID must be the value of getId(), and its location must be initialized to getLocation().
Implemented in fpmas::graph::TemporaryNode< T, PackType >.