OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
DiscConfig Class Reference

#include <DiscConfig.h>

Collaboration diagram for DiscConfig:
Collaboration graph
[legend]

Classes

struct  NodeData
 
struct  SMPData
 

Public Member Functions

 DiscConfig (const char *, const char *, bool)
 
 ~DiscConfig ()
 
bool ok () const
 
const std::string & getConfigFile () const
 
unsigned int numSMPs () const
 
unsigned int fileSMPs () const
 
unsigned int mySMP () const
 
unsigned int getSMPIndex () const
 
unsigned int getSMPIndex (const std::string &smpname) const
 
const std::string & getSMPHost () const
 
const std::string & getSMPHost (unsigned int smp) const
 
unsigned int getNumSMPNodes () const
 
unsigned int getNumSMPNodes (unsigned int smp) const
 
unsigned int getSMPNode (unsigned int n) const
 
unsigned int getSMPNode (unsigned int smp, unsigned int n) const
 
unsigned int getSMPBox0 () const
 
unsigned int getSMPBox0 (unsigned int smp) const
 
unsigned int getNumFiles () const
 
unsigned int getNumFiles (unsigned int smp) const
 
const std::string & getFilename (unsigned int fn) const
 
const std::string & getFilename (unsigned int smp, unsigned int fn) const
 
unsigned int getNumOtherSMP () const
 
unsigned int getNumOtherSMP (unsigned int smp) const
 
unsigned int getOtherSMP (unsigned int sn) const
 
unsigned int getOtherSMP (unsigned int smp, unsigned int sn) const
 
unsigned int pNodesPerSMP (unsigned int node) const
 
unsigned int getNumNodes () const
 
unsigned int getNodeSMPIndex (unsigned int n) const
 
const std::string & getNodeHost (unsigned int n) const
 
void printDebug (Inform &)
 

Static Public Member Functions

static int dc_tokenize_string (const char *s, const char *tok, std::string *&)
 

Private Member Functions

std::string replace_wildcards (const std::string &s, const std::string &machine)
 
void add_SMP_directory (SMPData *&, const std::string &s, const std::string &m, bool)
 
bool parse_config (const char *, bool)
 

Private Attributes

std::string ConfigFile
 
unsigned int NumSMPs
 
unsigned int FileSMPs
 
unsigned int MySMP
 
bool ConfigOK
 
vmap< std::string, SMPData * > SMPMap
 
std::vector< SMPData * > SMPList
 
std::vector< NodeData * > NodeList
 

Detailed Description

Definition at line 58 of file DiscConfig.h.

Constructor & Destructor Documentation

DiscConfig::DiscConfig ( const char *  config,
const char *  BaseFile,
bool  WritingFile 
)

Definition at line 87 of file DiscConfig.cpp.

References IpplInfo::abort(), ConfigFile, ConfigOK, endl(), ERRORMSG, and parse_config().

Here is the call graph for this function:

DiscConfig::~DiscConfig ( )

Definition at line 106 of file DiscConfig.cpp.

References NodeList, and SMPList.

Member Function Documentation

void DiscConfig::add_SMP_directory ( SMPData *&  ,
const std::string &  s,
const std::string &  m,
bool   
)
private
int DiscConfig::dc_tokenize_string ( const char *  s,
const char *  tok,
std::string *&   
)
static

Definition at line 52 of file DiscConfig.cpp.

Referenced by add_SMP_directory(), parse_config(), and DiscMeta::read_meta_line().

unsigned int DiscConfig::fileSMPs ( ) const
inline
const std::string& DiscConfig::getConfigFile ( ) const
inline
const std::string& DiscConfig::getFilename ( unsigned int  fn) const
inline
const std::string& DiscConfig::getFilename ( unsigned int  smp,
unsigned int  fn 
) const
inline

Definition at line 128 of file DiscConfig.h.

References SMPList.

const std::string& DiscConfig::getNodeHost ( unsigned int  n) const
inline

Definition at line 162 of file DiscConfig.h.

References Hypervolume::n, and NodeList.

Referenced by printDebug().

unsigned int DiscConfig::getNodeSMPIndex ( unsigned int  n) const
inline

Definition at line 157 of file DiscConfig.h.

References Hypervolume::n, and NodeList.

Referenced by DiscField< Dim >::distribute_offsets(), and printDebug().

unsigned int DiscConfig::getNumFiles ( ) const
inline
unsigned int DiscConfig::getNumFiles ( unsigned int  smp) const
inline

Definition at line 120 of file DiscConfig.h.

References SMPList.

unsigned int DiscConfig::getNumNodes ( ) const
inline

Definition at line 154 of file DiscConfig.h.

References NodeList.

Referenced by printDebug().

unsigned int DiscConfig::getNumOtherSMP ( ) const
inline

Definition at line 133 of file DiscConfig.h.

References getNumOtherSMP(), and MySMP.

Referenced by getNumOtherSMP(), printDebug(), DiscParticle::read_meta(), and DiscParticle::write().

Here is the call graph for this function:

unsigned int DiscConfig::getNumOtherSMP ( unsigned int  smp) const
inline

Definition at line 134 of file DiscConfig.h.

References SMPList.

unsigned int DiscConfig::getNumSMPNodes ( ) const
inline

Definition at line 101 of file DiscConfig.h.

References getNumSMPNodes(), and MySMP.

Referenced by DiscField< Dim >::distribute_offsets(), getNumSMPNodes(), printDebug(), DiscParticle::read_meta(), and DiscParticle::write().

Here is the call graph for this function:

unsigned int DiscConfig::getNumSMPNodes ( unsigned int  smp) const
inline

Definition at line 102 of file DiscConfig.h.

References SMPList.

unsigned int DiscConfig::getOtherSMP ( unsigned int  sn) const
inline

Definition at line 139 of file DiscConfig.h.

References MySMP.

Referenced by printDebug(), DiscParticle::read_meta(), and DiscParticle::write().

unsigned int DiscConfig::getOtherSMP ( unsigned int  smp,
unsigned int  sn 
) const
inline

Definition at line 142 of file DiscConfig.h.

References SMPList.

unsigned int DiscConfig::getSMPBox0 ( ) const
inline

Definition at line 113 of file DiscConfig.h.

References getSMPBox0(), and MySMP.

Referenced by getSMPBox0(), DiscField< Dim >::myBox0(), printDebug(), DiscParticle::read(), DiscParticle::read_meta(), DiscParticle::write(), and DiscParticle::write_meta().

Here is the call graph for this function:

unsigned int DiscConfig::getSMPBox0 ( unsigned int  smp) const
inline

Definition at line 114 of file DiscConfig.h.

References SMPList.

const std::string& DiscConfig::getSMPHost ( ) const
inline

Definition at line 95 of file DiscConfig.h.

References getSMPHost(), and MySMP.

Referenced by getSMPHost(), and printDebug().

Here is the call graph for this function:

const std::string& DiscConfig::getSMPHost ( unsigned int  smp) const
inline

Definition at line 96 of file DiscConfig.h.

References SMPList.

unsigned int DiscConfig::getSMPIndex ( ) const
inline

Definition at line 89 of file DiscConfig.h.

References MySMP.

unsigned int DiscConfig::getSMPIndex ( const std::string &  smpname) const
inline

Definition at line 90 of file DiscConfig.h.

References SMPMap.

unsigned int DiscConfig::getSMPNode ( unsigned int  n) const
inline

Definition at line 107 of file DiscConfig.h.

References getSMPNode(), and MySMP.

Referenced by DiscField< Dim >::distribute_offsets(), getSMPNode(), printDebug(), and DiscParticle::read_meta().

Here is the call graph for this function:

unsigned int DiscConfig::getSMPNode ( unsigned int  smp,
unsigned int  n 
) const
inline

Definition at line 108 of file DiscConfig.h.

References Hypervolume::n, and SMPList.

unsigned int DiscConfig::mySMP ( ) const
inline

Definition at line 82 of file DiscConfig.h.

References MySMP.

Referenced by DiscField< Dim >::mySMP(), printDebug(), and DiscParticle::read_meta().

unsigned int DiscConfig::numSMPs ( ) const
inline

Definition at line 80 of file DiscConfig.h.

References NumSMPs.

Referenced by DiscField< Dim >::numSMPs(), and printDebug().

bool DiscConfig::ok ( ) const
inline

Definition at line 73 of file DiscConfig.h.

References ConfigOK.

Referenced by DiscParticle::initialize().

bool DiscConfig::parse_config ( const char *  BaseFile,
bool  WritingFile 
)
private
unsigned int DiscConfig::pNodesPerSMP ( unsigned int  node) const

Definition at line 129 of file DiscConfig.cpp.

References getNumFiles(), NodeList, and SMPList.

Referenced by DiscField< Dim >::pNodesPerSMP().

Here is the call graph for this function:

void DiscConfig::printDebug ( Inform msg)
string DiscConfig::replace_wildcards ( const std::string &  s,
const std::string &  machine 
)
private

Definition at line 156 of file DiscConfig.cpp.

References IpplInfo::abort(), endl(), ERRORMSG, and IpplInfo::myNode().

Referenced by add_SMP_directory().

Here is the call graph for this function:

Member Data Documentation

std::string DiscConfig::ConfigFile
private

Definition at line 205 of file DiscConfig.h.

Referenced by DiscConfig(), getConfigFile(), and parse_config().

bool DiscConfig::ConfigOK
private

Definition at line 215 of file DiscConfig.h.

Referenced by DiscConfig(), and ok().

unsigned int DiscConfig::FileSMPs
private

Definition at line 210 of file DiscConfig.h.

Referenced by fileSMPs(), and parse_config().

unsigned int DiscConfig::MySMP
private
std::vector<NodeData *> DiscConfig::NodeList
private
unsigned int DiscConfig::NumSMPs
private

Definition at line 209 of file DiscConfig.h.

Referenced by numSMPs(), and parse_config().

std::vector<SMPData *> DiscConfig::SMPList
private
vmap<std::string,SMPData *> DiscConfig::SMPMap
private

Definition at line 220 of file DiscConfig.h.

Referenced by add_SMP_directory(), getSMPIndex(), and parse_config().


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