geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | List of all members
geopm::TreeCommImp Class Reference

#include <TreeComm.hpp>

Inheritance diagram for geopm::TreeCommImp:
Inheritance graph
[legend]
Collaboration diagram for geopm::TreeCommImp:
Collaboration graph
[legend]

Public Member Functions

 TreeCommImp (std::shared_ptr< Comm > comm, int num_send_down, int num_send_up)
 
 TreeCommImp (std::shared_ptr< Comm > comm, const std::vector< int > &fan_out, int num_level_ctl, int num_send_down, int num_send_up, std::vector< std::shared_ptr< TreeCommLevel > > mock_level)
 
virtual ~TreeCommImp ()
 
int num_level_controlled (void) const override
 Returns the number of tree levels controlled by the Controller on this node. This determines which levels can be used for send_down() and receive_up(). More...
 
int max_level (void) const override
 Returns the number of tree levels participated in by the Controller on this node. This determines which levels can be used for sending or receiving, including with the parent. More...
 
int root_level (void) const override
 Returns the level of the root of the tree, which is equal to the number of levels in the tree. More...
 
int level_rank (int level) const override
 Returns the rank of the given level. More...
 
int level_size (int level) const override
 Returns the number of children for each parent in the given level. More...
 
void send_down (int level, const std::vector< std::vector< double > > &policy) override
 Send policies down to children within a level. More...
 
void send_up (int level, const std::vector< double > &sample) override
 Send samples up to the parent within a level. More...
 
bool receive_down (int level, std::vector< double > &policy) override
 Receive policies from the parent within a level. More...
 
bool receive_up (int level, std::vector< std::vector< double > > &sample) override
 Receive samples from children within a level. More...
 
size_t overhead_send (void) const override
 Returns the total number of bytes sent from the entire tree. More...
 
- Public Member Functions inherited from geopm::TreeComm
 TreeComm ()=default
 
virtual ~TreeComm ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from geopm::TreeComm
static std::vector< int > fan_out (const std::shared_ptr< Comm > &comm)
 Returns the number of children at each level. More...
 

Constructor & Destructor Documentation

◆ TreeCommImp() [1/2]

geopm::TreeCommImp::TreeCommImp ( std::shared_ptr< Comm comm,
int  num_send_down,
int  num_send_up 
)

◆ TreeCommImp() [2/2]

geopm::TreeCommImp::TreeCommImp ( std::shared_ptr< Comm comm,
const std::vector< int > &  fan_out,
int  num_level_ctl,
int  num_send_down,
int  num_send_up,
std::vector< std::shared_ptr< TreeCommLevel > >  mock_level 
)

◆ ~TreeCommImp()

geopm::TreeCommImp::~TreeCommImp ( )
virtual

Member Function Documentation

◆ level_rank()

int geopm::TreeCommImp::level_rank ( int  level) const
overridevirtual

Returns the rank of the given level.

Implements geopm::TreeComm.

◆ level_size()

int geopm::TreeCommImp::level_size ( int  level) const
overridevirtual

Returns the number of children for each parent in the given level.

Implements geopm::TreeComm.

◆ max_level()

int geopm::TreeCommImp::max_level ( void  ) const
overridevirtual

Returns the number of tree levels participated in by the Controller on this node. This determines which levels can be used for sending or receiving, including with the parent.

Implements geopm::TreeComm.

◆ num_level_controlled()

int geopm::TreeCommImp::num_level_controlled ( void  ) const
overridevirtual

Returns the number of tree levels controlled by the Controller on this node. This determines which levels can be used for send_down() and receive_up().

Implements geopm::TreeComm.

◆ overhead_send()

size_t geopm::TreeCommImp::overhead_send ( void  ) const
overridevirtual

Returns the total number of bytes sent from the entire tree.

Implements geopm::TreeComm.

◆ receive_down()

bool geopm::TreeCommImp::receive_down ( int  level,
std::vector< double > &  policy 
)
overridevirtual

Receive policies from the parent within a level.

Implements geopm::TreeComm.

◆ receive_up()

bool geopm::TreeCommImp::receive_up ( int  level,
std::vector< std::vector< double > > &  sample 
)
overridevirtual

Receive samples from children within a level.

Returns
True if all of the children have only non-NaN data

Implements geopm::TreeComm.

◆ root_level()

int geopm::TreeCommImp::root_level ( void  ) const
overridevirtual

Returns the level of the root of the tree, which is equal to the number of levels in the tree.

Implements geopm::TreeComm.

◆ send_down()

void geopm::TreeCommImp::send_down ( int  level,
const std::vector< std::vector< double > > &  policy 
)
overridevirtual

Send policies down to children within a level.

Implements geopm::TreeComm.

◆ send_up()

void geopm::TreeCommImp::send_up ( int  level,
const std::vector< double > &  sample 
)
overridevirtual

Send samples up to the parent within a level.

Implements geopm::TreeComm.


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