class ParaParamSetMpi More...
#include <paraParamSetMpi.h>
Public Member Functions | |
ParaParamSetMpi () | |
constructor More... | |
ParaParamSetMpi (int inNParaParams) | |
constructor More... | |
~ParaParamSetMpi () | |
destructor More... | |
int | bcast (ParaComm *comm, int root) |
broadcast ParaParams More... | |
Public Member Functions inherited from ParaParamSet | |
ParaParamSet () | |
constructor More... | |
ParaParamSet (size_t nInParaParams) | |
constructor More... | |
virtual | ~ParaParamSet () |
destructor More... | |
bool | getBoolParamValue (int param) |
get bool parameter value More... | |
void | setBoolParamValue (int param, bool value) |
set bool parameter value More... | |
bool | getBoolParamDefaultValue (int param) |
get default value of bool parameter More... | |
void | setBoolParamDefaultValue (int param) |
set bool parameter default value More... | |
bool | isBoolParamDefaultValue (int param) |
check if bool parameter is default value or not More... | |
int | getIntParamValue (int param) |
get int parameter value More... | |
void | setIntParamValue (int param, int value) |
set int parameter value More... | |
int | getIntParamDefaultValue (int param) |
get default value of int parameter More... | |
void | setIntParamDefaultValue (int param) |
set int parameter default value More... | |
bool | isIntParamDefaultValue (int param) |
check if int parameter is default value or not More... | |
long long | getLongintParamValue (int param) |
get long int parameter value More... | |
void | setLongintParamValue (int param, long long value) |
set long int parameter value More... | |
long long | getLongintParamDefaultValue (int param) |
get default value of long int parameter More... | |
void | setLongintParamDefaultValue (int param) |
set long int parameter default value More... | |
bool | isLongintParamDefaultValue (int param) |
check if long int parameter is default value or not More... | |
double | getRealParamValue (int param) |
get real parameter value More... | |
void | setRealParamValue (int param, double value) |
set real parameter value More... | |
double | getRealParamDefaultValue (int param) |
get default value of real parameter More... | |
void | setRealParamDefaultValue (int param) |
set real parameter default value More... | |
bool | isRealParamDefaultValue (int param) |
check if real parameter is default value or not More... | |
char | getCharParamValue (int param) |
get char parameter value More... | |
void | setCharParamValue (int param, char value) |
set char parameter value More... | |
char | getCharParamDefaultValue (int param) |
get default value of char parameter More... | |
void | setCharParamDefaultValue (int param) |
set char parameter default value More... | |
bool | isCharParamDefaultValue (int param) |
check if char parameter is default value or not More... | |
const char * | getStringParamValue (int param) |
get string parameter value More... | |
void | setStringParamValue (int param, const char *value) |
set string parameter value More... | |
const char * | getStringParamDefaultValue (int param) |
get default value of string parameter More... | |
void | setStringParamDefaultValue (int param) |
set string parameter default value More... | |
bool | isStringParamDefaultValue (int param) |
check if string parameter is default value or not More... | |
virtual void | read (ParaComm *comm, const char *filename) |
read ParaParams from file More... | |
void | write (std::ostream *os) |
write ParaParams to output stream More... | |
size_t | getParaParamsSize () |
get parameter table size More... | |
virtual size_t | getNumBoolParams ()=0 |
get number of bool parameters More... | |
virtual size_t | getNumIntParams ()=0 |
get number of int parameters More... | |
virtual size_t | getNumLongintParams ()=0 |
get number of longint parameters More... | |
virtual size_t | getNumRealParams ()=0 |
get number of real parameters More... | |
virtual size_t | getNumCharParams ()=0 |
get number of char parameters More... | |
virtual size_t | getNumStringParams ()=0 |
get number of string parameters More... | |
virtual int | bcast (ParaComm *comm, int root)=0 |
broadcast ParaParams More... | |
Private Member Functions | |
void | allocateMemory () |
allocate temporary memory for transfer More... | |
void | freeMemory () |
free allocated temporary memory for transfer More... | |
void | createDiffParams () |
create non default parameters for transfer More... | |
void | setDiffParams () |
set non default parameters transferred More... | |
MPI_Datatype | createDatatype1 () |
create ParaParamSetDatatype1 More... | |
MPI_Datatype | createDatatype2 (bool reallocateStringPramsValue) |
create ParaParamSetDatatype2 More... | |
Private Attributes | |
int | nBoolParams |
the number of bool parameters More... | |
int * | boolParams |
boolean parameter ids More... | |
char * | boolParamValues |
boolean parameter values More... | |
int | nIntParams |
the number of int parameters More... | |
int * | intParams |
int parameter ids More... | |
int * | intParamValues |
int parameter values More... | |
int | nLongintParams |
the number of long int parameters More... | |
int * | longintParams |
long int parameter ids More... | |
long long * | longintParamValues |
long int parameter values More... | |
int | nRealParams |
the number of real parameters More... | |
int * | realParams |
real parameter ids More... | |
double * | realParamValues |
real parameter values More... | |
int | nCharParams |
the number of char parameters More... | |
int * | charParams |
char parameter ids More... | |
char * | charParamValues |
char parameter values More... | |
int | nStringParams |
the number of string parameters More... | |
int * | stringParams |
string parameter ids More... | |
int | stringParamValuesSize |
size of stringParameterValues area More... | |
char * | stringParamValues |
string parameter values: values are concatenated More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ParaParamSet | |
int | paramParaseBool (ParaParam *paraParam, char *valuestr) |
parse bool parameter More... | |
int | paramParaseInt (ParaParam *paraParam, char *valuestr) |
parse int parameter More... | |
int | paramParaseLongint (ParaParam *paraParam, char *valuestr) |
parse long int parameter More... | |
int | paramParaseReal (ParaParam *paraParam, char *valuestr) |
parse real parameter More... | |
int | paramParaseChar (ParaParam *paraParam, char *valuestr) |
parse real parameter More... | |
int | paramParaseString (ParaParam *paraParam, char *valuestr) |
parse real parameter More... | |
int | parameterParse (char *line, std::map< std::string, int > &mapStringToId) |
parse parameter (this routine is almost copy from paramset.c of SCIP code) More... | |
Protected Attributes inherited from ParaParamSet | |
size_t | nParaParams |
number of ParaParams More... | |
ParaParam ** | paraParams |
array of ParaParams More... | |
class ParaParamSetMpi
Definition at line 50 of file paraParamSetMpi.h.
ParaParamSetMpi | ( | ) |
constructor
Definition at line 121 of file paraParamSetMpi.h.
ParaParamSetMpi | ( | int | inNParaParams | ) |
constructor
Definition at line 148 of file paraParamSetMpi.h.
~ParaParamSetMpi | ( | ) |
destructor
Definition at line 177 of file paraParamSetMpi.h.
|
private |
allocate temporary memory for transfer
allocate memory for transfer
Definition at line 45 of file paraParamSetMpi.cpp.
References ParaParamSetMpi::boolParams, ParaParamSetMpi::boolParamValues, ParaParamSetMpi::charParams, ParaParamSetMpi::charParamValues, ParaParamSet::getNumBoolParams(), ParaParamSet::getNumCharParams(), ParaParamSet::getNumIntParams(), ParaParamSet::getNumLongintParams(), ParaParamSet::getNumRealParams(), ParaParamSet::getNumStringParams(), ParaParamString::getValue(), ParaParamSetMpi::intParams, ParaParamSetMpi::intParamValues, ParaParamString::isDefaultValue(), ParaParamSetMpi::longintParams, ParaParamSetMpi::longintParamValues, ParaParamSet::nParaParams, ParaParamSet::paraParams, UG::ParaParamsStringFirst, UG::ParaParamTypeString, ParaParamSetMpi::realParams, ParaParamSetMpi::realParamValues, ParaParamSetMpi::stringParams, and ParaParamSetMpi::stringParamValues.
Referenced by ParaParamSetMpi::bcast().
|
virtual |
broadcast ParaParams
comm | communicator used |
root | root rank for broadcast |
Implements ParaParamSet.
Definition at line 523 of file paraParamSetMpi.cpp.
References ParaParamSetMpi::allocateMemory(), comm, ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), DEF_PARA_COMM, ParaParamSetMpi::freeMemory(), MPI_CALL, ParaParamSetMpi::nBoolParams, PARA_COMM_CALL, and ParaParamSetMpi::setDiffParams().
|
private |
create ParaParamSetDatatype1
create Datatype1
Definition at line 307 of file paraParamSetMpi.cpp.
References MPI_CALL, ParaParamSetMpi::nBoolParams, ParaParamSetMpi::nCharParams, ParaParamSetMpi::nIntParams, ParaParamSetMpi::nLongintParams, ParaParamSetMpi::nRealParams, ParaParamSetMpi::nStringParams, and ParaParamSetMpi::stringParamValuesSize.
Referenced by ParaParamSetMpi::bcast().
|
private |
create ParaParamSetDatatype2
create Datatype2
Definition at line 366 of file paraParamSetMpi.cpp.
References ParaParamSetMpi::boolParams, ParaParamSetMpi::boolParamValues, ParaParamSetMpi::charParams, ParaParamSetMpi::charParamValues, ParaParamSetMpi::intParams, ParaParamSetMpi::intParamValues, ParaParamSetMpi::longintParams, ParaParamSetMpi::longintParamValues, MPI_CALL, ParaParamSetMpi::nBoolParams, ParaParamSetMpi::nCharParams, ParaParamSetMpi::nIntParams, ParaParamSetMpi::nLongintParams, ParaParamSetMpi::nRealParams, ParaParamSetMpi::nStringParams, ParaParamSetMpi::realParams, ParaParamSetMpi::realParamValues, ParaParamSetMpi::stringParams, ParaParamSetMpi::stringParamValues, and ParaParamSetMpi::stringParamValuesSize.
Referenced by ParaParamSetMpi::bcast().
|
private |
create non default parameters for transfer
constructor with scip
Definition at line 138 of file paraParamSetMpi.cpp.
References ParaParamSetMpi::boolParams, ParaParamSetMpi::boolParamValues, ParaParamSetMpi::charParams, ParaParamSetMpi::charParamValues, ParaParamBool::getValue(), ParaParamInt::getValue(), ParaParamLongint::getValue(), ParaParamReal::getValue(), ParaParamChar::getValue(), ParaParamString::getValue(), ParaParamSetMpi::intParams, ParaParamSetMpi::intParamValues, ParaParamBool::isDefaultValue(), ParaParamInt::isDefaultValue(), ParaParamLongint::isDefaultValue(), ParaParamReal::isDefaultValue(), ParaParamChar::isDefaultValue(), ParaParamString::isDefaultValue(), ParaParamSetMpi::longintParams, ParaParamSetMpi::nBoolParams, ParaParamSetMpi::nCharParams, ParaParamSetMpi::nIntParams, ParaParamSetMpi::nLongintParams, ParaParamSet::nParaParams, ParaParamSetMpi::nRealParams, ParaParamSetMpi::nStringParams, ParaParamSet::paraParams, UG::ParaParamTypeBool, UG::ParaParamTypeChar, UG::ParaParamTypeInt, UG::ParaParamTypeLongint, UG::ParaParamTypeReal, UG::ParaParamTypeString, ParaParamSetMpi::realParams, ParaParamSetMpi::realParamValues, ParaParamSetMpi::stringParams, ParaParamSetMpi::stringParamValues, ParaParamSetMpi::stringParamValuesSize, and THROW_LOGICAL_ERROR1.
Referenced by ParaParamSetMpi::bcast().
|
private |
free allocated temporary memory for transfer
free memory for transfer
Definition at line 100 of file paraParamSetMpi.cpp.
References ParaParamSetMpi::boolParams, ParaParamSetMpi::boolParamValues, ParaParamSetMpi::charParams, ParaParamSetMpi::charParamValues, ParaParamSet::getNumBoolParams(), ParaParamSet::getNumCharParams(), ParaParamSet::getNumIntParams(), ParaParamSet::getNumLongintParams(), ParaParamSet::getNumRealParams(), ParaParamSet::getNumStringParams(), ParaParamSetMpi::intParams, ParaParamSetMpi::intParamValues, ParaParamSetMpi::longintParams, ParaParamSetMpi::longintParamValues, ParaParamSetMpi::realParams, ParaParamSetMpi::realParamValues, ParaParamSetMpi::stringParams, and ParaParamSetMpi::stringParamValues.
Referenced by ParaParamSetMpi::bcast().
|
private |
set non default parameters transferred
set these parameter values in scip environment
Definition at line 241 of file paraParamSetMpi.cpp.
References ParaParamSetMpi::boolParams, ParaParamSetMpi::boolParamValues, ParaParamSetMpi::charParams, ParaParamSetMpi::charParamValues, ParaParamSetMpi::intParams, ParaParamSetMpi::intParamValues, ParaParamSetMpi::longintParams, ParaParamSetMpi::longintParamValues, ParaParamSetMpi::nBoolParams, ParaParamSetMpi::nCharParams, ParaParamSetMpi::nIntParams, ParaParamSetMpi::nLongintParams, ParaParamSetMpi::nRealParams, ParaParamSetMpi::nStringParams, ParaParamSet::paraParams, ParaParamSetMpi::realParams, ParaParamSetMpi::realParamValues, ParaParamBool::setValue(), ParaParamChar::setValue(), ParaParamString::setValue(), ParaParamReal::setValue(), ParaParamInt::setValue(), ParaParamLongint::setValue(), ParaParamSetMpi::stringParams, and ParaParamSetMpi::stringParamValues.
Referenced by ParaParamSetMpi::bcast().
|
private |
boolean parameter ids
Definition at line 53 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
boolean parameter values
Definition at line 54 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
char parameter ids
Definition at line 69 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
char parameter values
Definition at line 70 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
int parameter ids
Definition at line 57 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
int parameter values
Definition at line 58 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
long int parameter ids
Definition at line 61 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
long int parameter values
Definition at line 62 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
the number of bool parameters
Definition at line 52 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::bcast(), ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), and ParaParamSetMpi::setDiffParams().
|
private |
the number of char parameters
Definition at line 68 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), and ParaParamSetMpi::setDiffParams().
|
private |
the number of int parameters
Definition at line 56 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), and ParaParamSetMpi::setDiffParams().
|
private |
the number of long int parameters
Definition at line 60 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), and ParaParamSetMpi::setDiffParams().
|
private |
the number of real parameters
Definition at line 64 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), and ParaParamSetMpi::setDiffParams().
|
private |
the number of string parameters
Definition at line 72 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), and ParaParamSetMpi::setDiffParams().
|
private |
real parameter ids
Definition at line 65 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
real parameter values
Definition at line 66 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
string parameter ids
Definition at line 73 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
string parameter values: values are concatenated
Definition at line 75 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::allocateMemory(), ParaParamSetMpi::createDatatype2(), ParaParamSetMpi::createDiffParams(), ParaParamSetMpi::freeMemory(), and ParaParamSetMpi::setDiffParams().
|
private |
size of stringParameterValues area
Definition at line 74 of file paraParamSetMpi.h.
Referenced by ParaParamSetMpi::createDatatype1(), ParaParamSetMpi::createDatatype2(), and ParaParamSetMpi::createDiffParams().