HavoqGT
havoqgt::mpi::mailbox_routed< TMsg >::twod_router Class Reference

Public Member Functions

 twod_router ()
 
 twod_router (uint32_t rank, uint32_t size)
 
uint32_t proxy_rank (uint32_t dest)
 
const std::vector< uint32_t > & bcast_targets () const
 
const std::vector< uint32_t > & bcast_proxies () const
 

Public Attributes

int procs_per_node
 

Private Attributes

std::vector< uint32_t > m_bcast_proxies
 
std::vector< uint32_t > m_bcast_targets
 
uint64_t my_node_base_rank
 

Detailed Description

template<typename TMsg>
class havoqgt::mpi::mailbox_routed< TMsg >::twod_router

Definition at line 90 of file mailbox.hpp.

Constructor & Destructor Documentation

template<typename TMsg>
havoqgt::mpi::mailbox_routed< TMsg >::twod_router::twod_router ( )
inline

Definition at line 94 of file mailbox.hpp.

94 { }
template<typename TMsg>
havoqgt::mpi::mailbox_routed< TMsg >::twod_router::twod_router ( uint32_t  rank,
uint32_t  size 
)
inline

Definition at line 95 of file mailbox.hpp.

95  {
96  procs_per_node = std::min(size,uint32_t(24));
97  uint64_t rank_to_print = 2;
98  //if(rank == rank_to_print)
99  //std::cout << "Rank " << rank_to_print << "'s bcast_targets: ";
100  my_node_base_rank = rank - (rank % procs_per_node);;
101  for(uint32_t i=0; i<procs_per_node; ++i) {
102  uint64_t target = my_node_base_rank + i;
103  m_bcast_targets.push_back(target);
104  //if(rank==rank_to_print)
105  //std::cout << target << " ";
106  }
107  //if(rank==rank_to_print)
108  // std::cout << std::endl << "Rank " << rank_to_print << "'s bcast_proxies: ";
109  uint64_t node_offset = rank % procs_per_node;
110  for(uint32_t i=0; i<size / procs_per_node; ++i) {
111  uint64_t proxy = (i * procs_per_node) + node_offset;
112  m_bcast_proxies.push_back(proxy);
113  //if(rank==rank_to_print)
114  // std::cout << proxy << " ";
115  }
116  //if(rank == rank_to_print)
117  // std::cout << std::endl;
118  }
std::vector< uint32_t > m_bcast_proxies
Definition: mailbox.hpp:126
std::vector< uint32_t > m_bcast_targets
Definition: mailbox.hpp:127

Member Function Documentation

template<typename TMsg>
const std::vector<uint32_t>& havoqgt::mpi::mailbox_routed< TMsg >::twod_router::bcast_proxies ( ) const
inline

Definition at line 124 of file mailbox.hpp.

124 { return m_bcast_proxies; }
std::vector< uint32_t > m_bcast_proxies
Definition: mailbox.hpp:126

Here is the caller graph for this function:

template<typename TMsg>
const std::vector<uint32_t>& havoqgt::mpi::mailbox_routed< TMsg >::twod_router::bcast_targets ( ) const
inline

Definition at line 123 of file mailbox.hpp.

123 { return m_bcast_targets; }
std::vector< uint32_t > m_bcast_targets
Definition: mailbox.hpp:127

Here is the caller graph for this function:

template<typename TMsg>
uint32_t havoqgt::mpi::mailbox_routed< TMsg >::twod_router::proxy_rank ( uint32_t  dest)
inline

Definition at line 119 of file mailbox.hpp.

119  {
120  uint64_t dest_offset = dest % procs_per_node;
121  return my_node_base_rank + dest_offset;
122  }

Here is the caller graph for this function:

Member Data Documentation

template<typename TMsg>
std::vector<uint32_t> havoqgt::mpi::mailbox_routed< TMsg >::twod_router::m_bcast_proxies
private

Definition at line 126 of file mailbox.hpp.

template<typename TMsg>
std::vector<uint32_t> havoqgt::mpi::mailbox_routed< TMsg >::twod_router::m_bcast_targets
private

Definition at line 127 of file mailbox.hpp.

template<typename TMsg>
uint64_t havoqgt::mpi::mailbox_routed< TMsg >::twod_router::my_node_base_rank
private

Definition at line 128 of file mailbox.hpp.

template<typename TMsg>
int havoqgt::mpi::mailbox_routed< TMsg >::twod_router::procs_per_node

Definition at line 93 of file mailbox.hpp.


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