OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Protected Attributes | Private Attributes | List of all members
CommTopology Class Referenceabstract

Specifies interface for topology policies. More...

#include <CommTopology.h>

Inheritance diagram for CommTopology:
Inheritance graph
[legend]

Public Member Functions

 CommTopology (MPI_Comm comm=MPI_COMM_WORLD)
 
virtual ~CommTopology ()
 
virtual void discover ()=0
 every implementation must provide a discover method More...
 
int getRank () const
 
int getNP () const
 
unsigned int getNumDimensions () const
 
unsigned int getCoreID () const
 
std::vector< unsigned int > getCoordinates () const
 
std::vector< unsigned int > getDimensions () const
 

Protected Attributes

unsigned int hwID_
 
unsigned int num_dims_
 
unsigned int my_core_id_
 
std::vector< unsigned int > coords_
 
std::vector< unsigned int > dims_
 

Private Attributes

MPI_Comm comm_
 
int rank_
 
int num_procs_
 

Detailed Description

Specifies interface for topology policies.

Definition at line 9 of file CommTopology.h.

Constructor & Destructor Documentation

◆ CommTopology()

CommTopology::CommTopology ( MPI_Comm  comm = MPI_COMM_WORLD)
inline

Definition at line 13 of file CommTopology.h.

References comm_, num_procs_, and rank_.

◆ ~CommTopology()

virtual CommTopology::~CommTopology ( )
inlinevirtual

Definition at line 18 of file CommTopology.h.

Member Function Documentation

◆ discover()

virtual void CommTopology::discover ( )
pure virtual

every implementation must provide a discover method

Implemented in NoCommTopology.

◆ getCoordinates()

std::vector<unsigned int> CommTopology::getCoordinates ( ) const
inline

Definition at line 30 of file CommTopology.h.

References coords_.

◆ getCoreID()

unsigned int CommTopology::getCoreID ( ) const
inline

Definition at line 28 of file CommTopology.h.

References my_core_id_.

◆ getDimensions()

std::vector<unsigned int> CommTopology::getDimensions ( ) const
inline

Definition at line 31 of file CommTopology.h.

References dims_.

◆ getNP()

int CommTopology::getNP ( ) const
inline

Definition at line 25 of file CommTopology.h.

References num_procs_.

◆ getNumDimensions()

unsigned int CommTopology::getNumDimensions ( ) const
inline

Definition at line 27 of file CommTopology.h.

References num_dims_.

◆ getRank()

int CommTopology::getRank ( ) const
inline

Definition at line 24 of file CommTopology.h.

References rank_.

Member Data Documentation

◆ comm_

MPI_Comm CommTopology::comm_
private

Definition at line 36 of file CommTopology.h.

Referenced by CommTopology().

◆ coords_

std::vector<unsigned int> CommTopology::coords_
protected

Definition at line 47 of file CommTopology.h.

Referenced by getCoordinates().

◆ dims_

std::vector<unsigned int> CommTopology::dims_
protected

Definition at line 48 of file CommTopology.h.

Referenced by getDimensions().

◆ hwID_

unsigned int CommTopology::hwID_
protected

Definition at line 43 of file CommTopology.h.

◆ my_core_id_

unsigned int CommTopology::my_core_id_
protected

Definition at line 45 of file CommTopology.h.

Referenced by getCoreID().

◆ num_dims_

unsigned int CommTopology::num_dims_
protected

Definition at line 44 of file CommTopology.h.

Referenced by getNumDimensions().

◆ num_procs_

int CommTopology::num_procs_
private

Definition at line 38 of file CommTopology.h.

Referenced by CommTopology(), and getNP().

◆ rank_

int CommTopology::rank_
private

Definition at line 37 of file CommTopology.h.

Referenced by CommTopology(), and getRank().


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