gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::Scanner::resume_params_func Class Reference

class to interface with the plugin manager resume functions. More...

#include <plugin_defs.hpp>

Collaboration diagram for Gambit::Scanner::resume_params_func:

Public Member Functions

 resume_params_func (const std::string &name_in)
 
std::string get_name () const
 
void set_resume_mode (const bool &mode)
 
bool resume_mode () const
 
std::string get_temp_file_name (const std::string &temp_file)
 
void dump ()
 
int Rank () const
 
int NumTasks () const
 
template<typename... T>
void operator() (T &... params)
 

Private Attributes

std::string name
 
bool resume
 
int rank
 
int numtasks
 

Detailed Description

class to interface with the plugin manager resume functions.

Definition at line 52 of file plugin_defs.hpp.

Constructor & Destructor Documentation

◆ resume_params_func()

Gambit::Scanner::resume_params_func::resume_params_func ( const std::string &  name_in)
inline

Definition at line 61 of file plugin_defs.hpp.

References rank.

61  : resume(false)
62  {
63 #ifdef WITH_MPI
64  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
65  MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
66 #else
67  rank = 0;
68  numtasks = 1;
69 #endif
70  std::stringstream ss;
71  ss << rank;
72  name = name_in + "_" + ss.str();
73  }

Member Function Documentation

◆ dump()

void Gambit::Scanner::resume_params_func::dump ( )
inline

Definition at line 97 of file plugin_defs.hpp.

References Gambit::Scanner::Plugins::pluginInfo::dump(), and Gambit::Scanner::Plugins::plugin_info.

Referenced by Gambit::Scanner::TWalk().

98  {
100  }
void dump()
Dump contents for resume.
EXPORT_SYMBOLS pluginInfo plugin_info
Access Functor for plugin info.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_name()

std::string Gambit::Scanner::resume_params_func::get_name ( ) const
inline

Definition at line 75 of file plugin_defs.hpp.

References name.

75 { return name; }

◆ get_temp_file_name()

std::string Gambit::Scanner::resume_params_func::get_temp_file_name ( const std::string &  temp_file)
inline

Definition at line 84 of file plugin_defs.hpp.

References name, Gambit::Scanner::Plugins::plugin_info, rank, and Gambit::Scanner::Plugins::pluginInfo::temp_file_path().

Referenced by Gambit::Scanner::TWalk().

85  {
86  std::stringstream ss;
88  ss << name;
89  ss << "_";
90  ss << temp_file;
91  ss << "_";
92  ss << rank;
93 
94  return ss.str();
95  }
EXPORT_SYMBOLS pluginInfo plugin_info
Access Functor for plugin info.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NumTasks()

int Gambit::Scanner::resume_params_func::NumTasks ( ) const
inline

Definition at line 103 of file plugin_defs.hpp.

References numtasks.

Referenced by Gambit::Scanner::TWalk().

Here is the caller graph for this function:

◆ operator()()

template<typename... T>
void Gambit::Scanner::resume_params_func::operator() ( T &...  params)
inline

Definition at line 106 of file plugin_defs.hpp.

References Gambit::Scanner::Plugins::plugin_info, and Gambit::Scanner::Plugins::pluginInfo::resume().

107  {
109  }
void resume(const std::string &name, T &... data)
resume function
EXPORT_SYMBOLS pluginInfo plugin_info
Access Functor for plugin info.
Here is the call graph for this function:

◆ Rank()

int Gambit::Scanner::resume_params_func::Rank ( ) const
inline

Definition at line 102 of file plugin_defs.hpp.

References rank.

Referenced by Gambit::Scanner::TWalk().

Here is the caller graph for this function:

◆ resume_mode()

bool Gambit::Scanner::resume_params_func::resume_mode ( ) const
inline

Definition at line 82 of file plugin_defs.hpp.

References resume.

◆ set_resume_mode()

void Gambit::Scanner::resume_params_func::set_resume_mode ( const bool &  mode)
inline

Definition at line 77 of file plugin_defs.hpp.

78  {
79  resume = mode;
80  }

Member Data Documentation

◆ name

std::string Gambit::Scanner::resume_params_func::name
private

Definition at line 55 of file plugin_defs.hpp.

Referenced by get_name(), and get_temp_file_name().

◆ numtasks

int Gambit::Scanner::resume_params_func::numtasks
private

Definition at line 58 of file plugin_defs.hpp.

Referenced by NumTasks().

◆ rank

int Gambit::Scanner::resume_params_func::rank
private

Definition at line 57 of file plugin_defs.hpp.

Referenced by get_temp_file_name(), Rank(), and resume_params_func().

◆ resume

bool Gambit::Scanner::resume_params_func::resume
private

Definition at line 56 of file plugin_defs.hpp.

Referenced by resume_mode().


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