Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
Simulator Class Reference

Public Member Functions

virtual ~Simulator ()=default
 
void setup ()
 Destructor.
 
void finish ()
 Setup simulation.
 
void loadParameters ()
 Cleanup after simulation.
 
void printParameters () const
 Load member variables from configuration file.
 
void reset ()
 Prints loaded parameters to logging file.
 
void simulate ()
 Reset simulation objects.
 
void advanceEpoch (int currentEpoch) const
 
void saveResults () const
 Writes simulation results to an output destination.
 
bool instantiateSimulatorObjects ()
 Writes simulation results to an output destination.
 
int getTotalVertices () const
 
int getCurrentStep () const
 Count of neurons in the simulation.
 
int getNumEpochs () const
 Current simulation step.
 
BGFLOAT getEpochDuration () const
 Maximum number of simulation steps.
 
int getMaxFiringRate () const
 The length of each step in simulation time.
 
int getMaxEdgesPerVertex () const
 Maximum firing rate. GPU Only
 
BGFLOAT getDeltaT () const
 Maximum number of synapses per neuron. GPU Only
 
BGFLOAT getMaxRate () const
 
long getNoiseRngSeed () const
 
long getInitRngSeed () const
 Seed used for the simulation random SingleThreaded Only
 
string getConfigFileName () const
 Seed used to initialize parameters.
 
string getSerializationFileName () const
 File name of the parameter configuration file.
 
string getDeserializationFileName () const
 File name of the serialization file.
 
string getStimulusFileName () const
 File name of the deserialization file.
 
ModelgetModel () const
 File name of the stimulus input file.
 

Static Public Member Functions

static SimulatorgetInstance ()
 
void setConfigFileName (const string &fileName)
 Neural Network Model interface.
 
void setSerializationFileName (const string &fileName)
 
void setDeserializationFileName (const string &fileName)
 
void setStimulusFileName (const string &fileName)
 
 Simulator (const Simulator &simulator)=delete
 Delete copy and move methods to avoid copy instances of the singleton.
 
Simulatoroperator= (const Simulator &simulator)=delete
 
 Simulator (Simulator &&simulator)=delete
 
Simulatoroperator= (Simulator &&simulator)=delete
 

Detailed Description

Definition at line 26 of file Simulator.h.

Constructor & Destructor Documentation

◆ ~Simulator()

virtual Simulator::~Simulator ( )
virtualdefault

Acts as constructor, returns the instance of singleton object

Member Function Documentation

◆ advanceEpoch()

void Simulator::advanceEpoch ( int currentEpoch) const

Helper for simulate(). Advance simulation until ready for next growth cycle. This should simulate all neuron and synapse activity for one epoch.

Parameters
currentStepthe current epoch in which the network is being simulated.

Definition at line 185 of file Simulator.cpp.

◆ finish()

void Simulator::finish ( )

Setup simulation.

Begin terminating the simulator.

Definition at line 70 of file Simulator.cpp.

◆ getConfigFileName()

string Simulator::getConfigFileName ( ) const

Seed used to initialize parameters.

Definition at line 333 of file Simulator.cpp.

◆ getCurrentStep()

int Simulator::getCurrentStep ( ) const

Count of neurons in the simulation.

Definition at line 288 of file Simulator.cpp.

◆ getDeltaT()

BGFLOAT Simulator::getDeltaT ( ) const

Maximum number of synapses per neuron. GPU Only

GPU Only.

Definition at line 313 of file Simulator.cpp.

◆ getDeserializationFileName()

string Simulator::getDeserializationFileName ( ) const

File name of the serialization file.

Definition at line 343 of file Simulator.cpp.

◆ getEpochDuration()

BGFLOAT Simulator::getEpochDuration ( ) const

Maximum number of simulation steps.

Definition at line 298 of file Simulator.cpp.

◆ getInitRngSeed()

long Simulator::getInitRngSeed ( ) const

Seed used for the simulation random SingleThreaded Only

Definition at line 328 of file Simulator.cpp.

◆ getInstance()

Simulator & Simulator::getInstance ( )
static

Acts as constructor first time it's called, returns the instance of the singleton object

Definition at line 21 of file Simulator.cpp.

◆ getMaxEdgesPerVertex()

int Simulator::getMaxEdgesPerVertex ( ) const

Maximum firing rate. GPU Only

GPU Only

Definition at line 308 of file Simulator.cpp.

◆ getMaxFiringRate()

int Simulator::getMaxFiringRate ( ) const

The length of each step in simulation time.

Definition at line 303 of file Simulator.cpp.

◆ getMaxRate()

BGFLOAT Simulator::getMaxRate ( ) const

Time elapsed between the beginning and end of the simulation step

Definition at line 318 of file Simulator.cpp.

◆ getModel()

Model & Simulator::getModel ( ) const

File name of the stimulus input file.

Definition at line 353 of file Simulator.cpp.

◆ getNoiseRngSeed()

long Simulator::getNoiseRngSeed ( ) const

growth variable (m_targetRate / m_epsilon) TODO: more detail here

Definition at line 323 of file Simulator.cpp.

◆ getNumEpochs()

int Simulator::getNumEpochs ( ) const

Current simulation step.

Definition at line 293 of file Simulator.cpp.

◆ getSerializationFileName()

string Simulator::getSerializationFileName ( ) const

File name of the parameter configuration file.

Definition at line 338 of file Simulator.cpp.

◆ getStimulusFileName()

string Simulator::getStimulusFileName ( ) const

File name of the deserialization file.

Definition at line 348 of file Simulator.cpp.

◆ getTotalVertices()

int Simulator::getTotalVertices ( ) const

Definition at line 283 of file Simulator.cpp.

◆ instantiateSimulatorObjects()

bool Simulator::instantiateSimulatorObjects ( )

Writes simulation results to an output destination.

Instantiates Model which causes all other lower level simulator objects to be instantiated. Checks if all expected objects were created correctly and returns T/F on the success of the check.

Definition at line 236 of file Simulator.cpp.

◆ loadParameters()

void Simulator::loadParameters ( )

Cleanup after simulation.

Load member variables from configuration file.

Definition at line 77 of file Simulator.cpp.

◆ printParameters()

void Simulator::printParameters ( ) const

Load member variables from configuration file.

Prints out loaded parameters to logging file.

Definition at line 110 of file Simulator.cpp.

◆ reset()

void Simulator::reset ( )

Prints loaded parameters to logging file.

Resets all of the maps. Releases and re-allocates memory for each map, clearing them as necessary.

Definition at line 125 of file Simulator.cpp.

◆ saveResults()

void Simulator::saveResults ( ) const

Writes simulation results to an output destination.

Advance simulation to next growth cycle. Helper for simulate().

Definition at line 228 of file Simulator.cpp.

◆ setConfigFileName()

void Simulator::setConfigFileName ( const string & fileName)

Neural Network Model interface.

Definition at line 257 of file Simulator.cpp.

◆ setDeserializationFileName()

void Simulator::setDeserializationFileName ( const string & fileName)

Definition at line 267 of file Simulator.cpp.

◆ setSerializationFileName()

void Simulator::setSerializationFileName ( const string & fileName)

Definition at line 262 of file Simulator.cpp.

◆ setStimulusFileName()

void Simulator::setStimulusFileName ( const string & fileName)

Definition at line 272 of file Simulator.cpp.

◆ setup()

void Simulator::setup ( )

Destructor.

Initialize and prepare network for simulation.

Definition at line 44 of file Simulator.cpp.

◆ simulate()

void Simulator::simulate ( )

Reset simulation objects.

Run simulation.

Definition at line 138 of file Simulator.cpp.


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