HavoqGT
havoqgt::old_environment Class Reference

#include <environment.hpp>

Public Member Functions

 old_environment ()
 
uint32_t mailbox_num_irecv () const
 
uint32_t mailbox_num_isend () const
 
uint32_t mailbox_aggregation () const
 
uint32_t mailbox_tree_aggregation () const
 
bool mailbox_print_stats () const
 
template<typename T >
get_env_var (const char *key, T default_val) const
 
void print () const
 

Private Attributes

uint32_t m_mailbox_num_irecv
 
uint32_t m_mailbox_num_isend
 
uint32_t m_mailbox_aggregation
 
uint32_t m_mailbox_tree_aggregation
 
bool m_mailbox_print_stats
 

Detailed Description

Todo:

delete this

add environment variable documentation

Definition at line 69 of file environment.hpp.

Constructor & Destructor Documentation

havoqgt::old_environment::old_environment ( )
inline

Definition at line 71 of file environment.hpp.

71  {
72  m_mailbox_num_irecv = get_env_var<uint32_t>("HAVOQGT_MAILBOX_NUM_IRECV", 8);
73  m_mailbox_num_isend = get_env_var<uint32_t>("HAVOQGT_MAILBOX_NUM_ISEND", 8);
74  m_mailbox_aggregation = get_env_var<uint32_t>("HAVOQGT_MAILBOX_AGGREGATION", 1024);
75  m_mailbox_tree_aggregation = get_env_var<uint32_t>("HAVOQGT_MAILBOX_TREE_AGGREGATION", 64);
76  m_mailbox_print_stats = get_env_var<bool> ("HAVOQGT_MAILBOX_PRINT_STATS", false);
77  }
uint32_t m_mailbox_tree_aggregation
Definition: environment.hpp:94

Member Function Documentation

template<typename T >
T havoqgt::old_environment::get_env_var ( const char *  key,
default_val 
) const
inline

Definition at line 110 of file environment.hpp.

110  {
111  char* val = std::getenv( key );
112  if(val != NULL) {
113  try {
114  default_val = boost::lexical_cast<T>(val);
115  } catch (...) {
116  std::stringstream err;
117  err << "havoqgt::environment -- Unable to parse environment variable: "
118  << key << "=" << val << std::endl;
119  throw std::runtime_error(err.str());
120  }
121  }
122 
123  return default_val;
124 }
uint32_t havoqgt::old_environment::mailbox_aggregation ( ) const
inline

Definition at line 81 of file environment.hpp.

81 { return m_mailbox_aggregation; }

Here is the caller graph for this function:

uint32_t havoqgt::old_environment::mailbox_num_irecv ( ) const
inline

Definition at line 79 of file environment.hpp.

79 { return m_mailbox_num_irecv; }

Here is the caller graph for this function:

uint32_t havoqgt::old_environment::mailbox_num_isend ( ) const
inline

Definition at line 80 of file environment.hpp.

80 { return m_mailbox_num_isend; }
bool havoqgt::old_environment::mailbox_print_stats ( ) const
inline

Definition at line 83 of file environment.hpp.

uint32_t havoqgt::old_environment::mailbox_tree_aggregation ( ) const
inline

Definition at line 82 of file environment.hpp.

uint32_t m_mailbox_tree_aggregation
Definition: environment.hpp:94
void havoqgt::old_environment::print ( ) const
inline

Definition at line 99 of file environment.hpp.

99  {
100  std::cout << "HAVOQGT_MAILBOX_NUM_IRECV "<< " = " << m_mailbox_num_irecv << std::endl;
101  std::cout << "HAVOQGT_MAILBOX_NUM_ISEND "<< " = " << m_mailbox_num_isend << std::endl;
102  std::cout << "HAVOQGT_MAILBOX_AGGREGATION "<< " = " << m_mailbox_aggregation << std::endl;
103  std::cout << "HAVOQGT_MAILBOX_TREE_AGGREGATION "<< " = " << m_mailbox_tree_aggregation << std::endl;
104  std::cout << "HAVOQGT_MAILBOX_PRINT_STATS "<< " = " << m_mailbox_print_stats << std::endl;
105 }
uint32_t m_mailbox_tree_aggregation
Definition: environment.hpp:94

Here is the caller graph for this function:

Member Data Documentation

uint32_t havoqgt::old_environment::m_mailbox_aggregation
private

Definition at line 93 of file environment.hpp.

uint32_t havoqgt::old_environment::m_mailbox_num_irecv
private

Definition at line 91 of file environment.hpp.

uint32_t havoqgt::old_environment::m_mailbox_num_isend
private

Definition at line 92 of file environment.hpp.

bool havoqgt::old_environment::m_mailbox_print_stats
private

Definition at line 95 of file environment.hpp.

uint32_t havoqgt::old_environment::m_mailbox_tree_aggregation
private

Definition at line 94 of file environment.hpp.


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