fpmas 1.6
Public Member Functions | Protected Attributes | List of all members
fpmas::graph::DistributedNodeBuilder< T > Class Template Reference

#include <graph_builder.h>

Inheritance diagram for fpmas::graph::DistributedNodeBuilder< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::graph::DistributedNodeBuilder< T >:
Collaboration graph
[legend]

Public Member Functions

 DistributedNodeBuilder (std::size_t node_count, fpmas::api::communication::MpiCommunicator &comm)
 
std::size_t nodeCount () override
 
std::size_t localNodeCount () override
 
- Public Member Functions inherited from fpmas::api::graph::DistributedNodeBuilder< T >
virtual std::size_t localNodeCount ()=0
 
virtual DistributedNode< T > * buildDistantNode (DistributedId id, int location, DistributedGraph< T > &graph)=0
 
- Public Member Functions inherited from fpmas::api::graph::NodeBuilder< T >
virtual std::size_t nodeCount ()=0
 
virtual DistributedNode< T > * buildNode (DistributedGraph< T > &graph)=0
 

Protected Attributes

std::size_t local_node_count
 

Detailed Description

template<typename T>
class fpmas::graph::DistributedNodeBuilder< T >

Base implementation of the DistributedNodeBuilder.

This is not a final implementation: this class must be extended to implement buildNode() and buildDistantNode().

Template Parameters
Tgraph data type

Constructor & Destructor Documentation

◆ DistributedNodeBuilder()

template<typename T >
fpmas::graph::DistributedNodeBuilder< T >::DistributedNodeBuilder ( std::size_t  node_count,
fpmas::api::communication::MpiCommunicator comm 
)
inline

DistributedNodeBuilder constructor.

The count of nodes to be built on each process (localNodeCount()) is initialized so that each process must (approximately) build the same amount of nodes.

Parameters
node_counttotal node count that must be generated on all processes
commMPI communicator

Member Function Documentation

◆ nodeCount()

template<typename T >
std::size_t fpmas::graph::DistributedNodeBuilder< T >::nodeCount ( )
inlineoverridevirtual

◆ localNodeCount()

template<typename T >
std::size_t fpmas::graph::DistributedNodeBuilder< T >::localNodeCount ( )
inlineoverridevirtual

Returns the count of nodes that the DistributedNodeBuilder can generate on the current process.

The value returned by this function is expected to be updated while buildNode() calls are performed.

Returns
count of nodes that can be built on the local process

Implements fpmas::api::graph::DistributedNodeBuilder< T >.

Member Data Documentation

◆ local_node_count

template<typename T >
std::size_t fpmas::graph::DistributedNodeBuilder< T >::local_node_count
protected

Current count of nodes that can be generated on the local process.


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