PetaVision
Alpha
|
PVParams (size_t initialSize, Communicator *inIcComm) | |
PVParams (const char *filename, size_t initialSize, Communicator *inIcComm) | |
PVParams (const char *buffer, long int bufferLength, size_t initialSize, Communicator *inIcComm) | |
void | ioParamString (enum ParamsIOFlag ioFlag, const char *groupName, const char *paramName, char **paramStringValue, const char *defaultValue, bool warnIfAbsent=true) |
void | ioParamStringRequired (enum ParamsIOFlag ioFlag, const char *groupName, const char *paramName, char **paramStringValue) |
void | writeParamString (const char *paramName, const char *svalue) |
int | present (const char *groupName, const char *paramName) |
double | value (const char *groupName, const char *paramName) |
double | value (const char *groupName, const char *paramName, double initialValue, bool warnIfAbsent=true) |
int | valueInt (const char *groupName, const char *paramName) |
int | valueInt (const char *groupName, const char *paramName, int initialValue, bool warnIfAbsent=true) |
bool | arrayPresent (const char *groupName, const char *paramName) |
const float * | arrayValues (const char *groupName, const char *paramName, int *arraySize, bool warnIfAbsent=true) |
const double * | arrayValuesDbl (const char *groupName, const char *paramName, int *arraySize, bool warnIfAbsent=true) |
int | stringPresent (const char *groupName, const char *paramStringName) |
const char * | stringValue (const char *groupName, const char *paramStringName, bool warnIfAbsent=true) |
ParameterGroup * | group (const char *groupName) |
const char * | groupNameFromIndex (int index) |
const char * | groupKeywordFromIndex (int index) |
const char * | groupKeywordFromName (const char *name) |
int | setParameterSweepValues (int n) |
template<> | |
void | ioParamValue (enum ParamsIOFlag ioFlag, const char *groupName, const char *paramName, int *paramValue, int defaultValue, bool warnIfAbsent) |
template<> | |
void | ioParamValueRequired (enum ParamsIOFlag ioFlag, const char *groupName, const char *paramName, int *paramValue) |
template<> | |
void | writeParam (const char *paramName, bool paramValue) |
int | initialize (size_t initialSize) |
int | parseFile (const char *filename) |
void | loadParamBuffer (char const *filename, std::string ¶msFileString) |
int | parseBuffer (const char *buffer, long int bufferLength) |
int | setParameterSweepSize () |
int | newActiveParamSweep () |
bool | hasSweepValue (const char *paramName) |
int | convertParamToInt (double value) |
int | warnUnread () |
bool | hasBeenRead (const char *group_name, const char *param_name) |
bool | presentAndNotBeenRead (const char *group_name, const char *param_name) |
void | handleUnnecessaryParameter (const char *group_name, const char *param_name) |
void | handleUnnecessaryStringParameter (const char *group_name, const char *param_name) |
void | handleUnnecessaryStringParameter (const char *group_name, const char *param_name, const char *correctValue, bool case_insensitive_flag=false) |
void | action_pvparams_directive (char *id, double val) |
void | addGroup (char *keyword, char *name) |
void | addActiveParamSweep (const char *group_name, const char *param_name) |
int | clearHasBeenReadFlags () |
void | action_parameter_group_name (char *keyword, char *name) |
void | action_parameter_group () |
void | action_parameter_def (char *id, double val) |
void | action_parameter_def_overwrite (char *id, double val) |
void | action_parameter_array (char *id) |
void | action_parameter_array_overwrite (char *id) |
void | action_parameter_array_value (double val) |
void | action_parameter_string_def (const char *id, const char *stringval) |
void | action_parameter_string_def_overwrite (const char *id, const char *stringval) |
void | action_parameter_filename_def (const char *id, const char *stringval) |
void | action_parameter_filename_def_overwrite (const char *id, const char *stringval) |
void | action_include_directive (const char *stringval) |
void | action_parameter_sweep_open (const char *groupname, const char *paramname) |
void | action_parameter_sweep_close () |
void | action_parameter_sweep_values_number (double val) |
void | action_parameter_sweep_values_string (const char *stringval) |
void | action_parameter_sweep_values_filename (const char *stringval) |
void | checkDuplicates (const char *paramName) |
static char * | stripQuotationMarks (const char *s) |
static char * | stripOverwriteTag (const char *s) |
Public Member Functions | |
int | getParameterSweepSize () |
bool | getParseStatus () |
template<typename T > | |
void | handleUnnecessaryParameter (const char *group_name, const char *param_name, T correct_value) |
template<typename T > | |
void | ioParamArray (enum ParamsIOFlag ioFlag, const char *groupName, const char *paramName, T **paramArrayValue, int *arraysize) |
template<typename T > | |
void | ioParamValue (enum ParamsIOFlag ioFlag, const char *groupName, const char *paramName, T *val, T defaultValue, bool warnIfAbsent=true) |
template<typename T > | |
void | ioParamValueRequired (enum ParamsIOFlag ioFlag, const char *groupName, const char *paramName, T *val) |
int | numberOfGroups () |
int | numberOfParameterSweeps () |
void | setPrintLuaStream (FileStream *printLuaStream) |
void | setPrintParamsStream (FileStream *printParamsStream) |
template<typename T > | |
void | writeParam (const char *paramName, T paramValue) |
template<typename T > | |
void | writeParamArray (const char *paramName, const T *array, int arraysize) |
Private Attributes | |
ParameterSweep * | activeParamSweep |
ParameterArrayStack * | arrayStack |
ParameterArray * | currentParamArray |
char * | currGroupKeyword |
char * | currGroupName |
char * | currSweepGroupName |
char * | currSweepParamName |
bool | debugParsing |
bool | disable |
size_t | groupArraySize |
ParameterGroup ** | groups |
Communicator * | icComm |
FileStream * | mPrintLuaStream = nullptr |
FileStream * | mPrintParamsStream = nullptr |
int | numGroups |
int | numParamSweeps |
int | parameterSweepSize |
ParameterSweep ** | paramSweeps |
int | parseStatus |
ParameterStack * | stack |
ParameterStringStack * | stringStack |
int | worldRank |
int | worldSize |
Definition at line 239 of file PVParams.hpp.
PV::PVParams::PVParams | ( | const char * | filename, |
size_t | initialSize, | ||
Communicator * | inIcComm | ||
) |
Definition at line 787 of file PVParams.cpp.
void PV::PVParams::action_parameter_def | ( | char * | id, |
double | val | ||
) |
Definition at line 1902 of file PVParams.cpp.
void PV::PVParams::action_pvparams_directive | ( | char * | id, |
double | val | ||
) |
Definition at line 1831 of file PVParams.cpp.
ParameterGroup * PV::PVParams::group | ( | const char * | groupName | ) |
Definition at line 1556 of file PVParams.cpp.
void PV::PVParams::handleUnnecessaryStringParameter | ( | const char * | group_name, |
const char * | param_name | ||
) |
If the given parameter group has a string parameter with the given parameter name, issue a warning that the string parameter is unnecessary, and mark string parameter as having been read.
Definition at line 1704 of file PVParams.cpp.
void PV::PVParams::handleUnnecessaryStringParameter | ( | const char * | group_name, |
const char * | param_name, | ||
const char * | correctValue, | ||
bool | case_insensitive_flag = false |
||
) |
If the given parameter group has a string parameter with the given parameter name, issue a warning that the string parameter is unnecessary, and mark string parameter as having been read. Additionally, compare the value in params to the given correct value, and exit with an error if they are not equal.
Definition at line 1721 of file PVParams.cpp.
int PV::PVParams::present | ( | const char * | groupName, |
const char * | paramName | ||
) |
Definition at line 1254 of file PVParams.cpp.
double PV::PVParams::value | ( | const char * | groupName, |
const char * | paramName | ||
) |
Definition at line 1270 of file PVParams.cpp.
double PV::PVParams::value | ( | const char * | groupName, |
const char * | paramName, | ||
double | initialValue, | ||
bool | warnIfAbsent = true |
||
) |
Definition at line 1315 of file PVParams.cpp.