Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
|
Public Member Functions | |
~ParameterManager ()=default | |
Utility Methods. | |
ParameterManager (const ParameterManager ¶meterManager)=delete | |
Delete copy and move methods to avoid copy instances of the singleton. | |
ParameterManager & | operator= (const ParameterManager ¶meterManager)=delete |
ParameterManager (ParameterManager &¶meterManager)=delete | |
ParameterManager & | operator= (ParameterManager &¶meterManager)=delete |
static ParameterManager & | getInstance () |
Get Instance method that returns a reference to this object. | |
bool | loadParameterFile (string path) |
bool | getStringByXpath (string xpath, string &referenceVar) |
Interface methods for simulator objects. | |
bool | getIntByXpath (string xpath, int &referenceVar) |
bool | getDoubleByXpath (string xpath, double &referenceVar) |
bool | getFloatByXpath (string xpath, float &referenceVariable) |
bool | getBGFloatByXpath (string xpath, BGFLOAT &referenceVar) |
bool | getLongByXpath (string xpath, long &referenceVar) |
bool | getIntVectorByXpath (const string &path, const string &elementName, vector< int > &referenceVar) |
bool | getFileByXpath (const string &path, ifstream &file) |
Definition at line 37 of file ParameterManager.h.
bool ParameterManager::getBGFloatByXpath | ( | string | xpath, |
BGFLOAT & | referenceVar ) |
Interface method to pull a BGFLOAT value from the xml schema. The calling object must know the xpath to retrieve the value.
This method is a wrapper to run the correct calls based on how BGFLOAT is defined for the simulator. (For multi-threaded usage, floats are used due to register size on GPUs, and double usage is available for single-threaded CPU instances.)
xpath | The xpath for the desired float value in the XML file |
referenceVar | The variable to store the float result into |
Definition at line 219 of file ParameterManager.cpp.
bool ParameterManager::getDoubleByXpath | ( | string | xpath, |
double & | referenceVar ) |
Interface method to pull a double value from the xml schema. The calling object must know the xpath to retrieve the value.
xpath | The xpath for the desired double value in the XML file |
referenceVar | The variable to store the double result into |
Definition at line 150 of file ParameterManager.cpp.
bool ParameterManager::getFileByXpath | ( | const string & | path, |
ifstream & | file ) |
Load the file indicated by the given string path into the ifstream object.
path | the path to the XML element containing the file name |
file | ifstream object were file will be loaded |
Definition at line 310 of file ParameterManager.cpp.
bool ParameterManager::getFloatByXpath | ( | string | xpath, |
float & | referenceVariable ) |
Interface method to pull a float value from the xml schema. The calling object must know the xpath to retrieve the value.
xpath | The xpath for the desired float value in the XML file |
referenceVariable | The variable to store the float result into |
Definition at line 182 of file ParameterManager.cpp.
|
static |
Get Instance method that returns a reference to this object.
Definition at line 44 of file ParameterManager.cpp.
bool ParameterManager::getIntByXpath | ( | string | xpath, |
int & | referenceVar ) |
Interface method to pull an integer value from the xml schema. The calling object must know the xpath to retrieve the value.
xpath | The xpath for the desired int value in the XML file |
referenceVar | The variable to store the int result into |
Definition at line 111 of file ParameterManager.cpp.
bool ParameterManager::getIntVectorByXpath | ( | const string & | path, |
const string & | elementName, | ||
vector< int > & | referenceVar ) |
Interface method to pull a list of ints into a vector<int> from the xml schema. The calling object must match the elementName that stores the list. The xml files in the NLists directory name the element by which type of neuron lists is expected.
A - Active Neuron List I - Inhibitory Neuron List P - Probed Neuron List
path | the path to the xml file to read from |
elementName | The name of the element that stores the list of ints |
referenceVariable | The reference variable to store the list of ints |
Definition at line 275 of file ParameterManager.cpp.
bool ParameterManager::getLongByXpath | ( | string | xpath, |
long & | referenceVar ) |
Interface method to pull a long value from the xml schema. The calling object must know the xpath to retrieve the value.
xpath | The xpath for the desired float value in the XML file |
referenceVariable | The variable to store the long result into |
Definition at line 238 of file ParameterManager.cpp.
bool ParameterManager::getStringByXpath | ( | string | xpath, |
string & | referenceVar ) |
Interface methods for simulator objects.
Interface method to pull a string object from the xml schema. The calling object must know the xpath to retrieve the value.
xpath | The xpath for the desired string value in the XML file |
referenceVar | The variable to store the string result into |
Definition at line 88 of file ParameterManager.cpp.
bool ParameterManager::loadParameterFile | ( | string | path | ) |
Loads the XML file into a TinyXML tree. This is the starting point for all XPath retrieval calls for the client classes to use.
Definition at line 53 of file ParameterManager.cpp.