Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
Model Class Referenceabstract
Inheritance diagram for Model:

Public Member Functions

 Model ()
 Constructor.
 
virtual ~Model ()=default
 Destructor.
 
ConnectionsgetConnections () const
 Returns reference to Connections.
 
LayoutgetLayout () const
 Returns reference to Layout.
 
RecordergetRecorder () const
 Returns reference to Recorder.
 
virtual void saveResults ()
 Save simulation results to an output destination.
 
virtual void setupSim ()
 Sets up the Simulation.
 
virtual void finish ()=0
 Performs any finalization tasks on network following a simulation.
 
virtual void updateHistory ()
 Update the simulation history of every epoch.
 
virtual void advance ()=0
 
virtual void updateConnections ()=0
 
template<class Archive >
void serialize (Archive &archive, std::uint32_t const version)
 Cereal serialization method.
 

Protected Member Functions

virtual void copyGPUtoCPU ()=0
 Prints debug information about the current state of the network.
 
virtual void copyCPUtoGPU ()=0
 Copy CPU Edge data to GPU.
 
void createAllVertices ()
 Creates all the vertices and generates data for them.
 

Protected Attributes

unique_ptr< Connectionsconnections_
 
unique_ptr< Layoutlayout_
 
unique_ptr< Recorderrecorder_
 
log4cplus::Logger fileLogger_
 

Detailed Description

Definition at line 34 of file Model.h.

Constructor & Destructor Documentation

◆ Model()

Model::Model ( )

Constructor.

Definition at line 24 of file Model.cpp.

Member Function Documentation

◆ advance()

virtual void Model::advance ( )
pure virtual

Advances network state one simulation step. accessors (getVertices, etc. owned by advance.) advance has detailed control over what does what when. detailed, low level control. clear onn what is happening when, how much time it is taking. If, during an advance cycle, a vertex $A$ at coordinates $x,y$ fires, every edge which receives output is notified of the spike. Those edges then hold the spike until their delay period is completed. At a later advance cycle, once the delay period has been completed, the synapses apply their PSRs (Post-Synaptic-Response) to the summation points. Finally, on the next advance cycle, each vertex $B$ adds the value stored in their corresponding summation points to their $V_m$ and resets the summation points to zero.

Implemented in CPUModel, and GPUModel.

◆ copyCPUtoGPU()

virtual void Model::copyCPUtoGPU ( )
protectedpure virtual

Copy CPU Edge data to GPU.

Implemented in CPUModel, and GPUModel.

◆ copyGPUtoCPU()

virtual void Model::copyGPUtoCPU ( )
protectedpure virtual

Prints debug information about the current state of the network.

Copy GPU Edge data to CPU.

Implemented in CPUModel, and GPUModel.

◆ createAllVertices()

void Model::createAllVertices ( )
protected

Creates all the vertices and generates data for them.

Definition at line 76 of file Model.cpp.

◆ finish()

virtual void Model::finish ( )
pure virtual

Performs any finalization tasks on network following a simulation.

Implemented in CPUModel, and GPUModel.

◆ getConnections()

Connections & Model::getConnections ( ) const

Returns reference to Connections.

Get the Connections class object.

Returns
Pointer to the Connections class object.

Definition at line 155 of file Model.cpp.

◆ getLayout()

Layout & Model::getLayout ( ) const

Returns reference to Layout.

Get the Layout class object.

Returns
Pointer to the Layout class object.

Definition at line 162 of file Model.cpp.

◆ getRecorder()

Recorder & Model::getRecorder ( ) const

Returns reference to Recorder.

Get the Recorder class object.

Returns
Pointer to the Recorder class object.

Definition at line 170 of file Model.cpp.

◆ saveResults()

void Model::saveResults ( )
virtual

Save simulation results to an output destination.

Writes simulation results to an output destination. Downstream from IModel saveData()

Definition at line 67 of file Model.cpp.

◆ serialize()

template<class Archive >
void Model::serialize ( Archive & archive,
std::uint32_t const version )

Cereal serialization method.

Definition at line 117 of file Model.h.

◆ setupSim()

void Model::setupSim ( )
virtual

Sets up the Simulation.

Set up model state, for a specific simulation run. Downstream from IModel setupSim()

Reimplemented in GPUModel.

Definition at line 88 of file Model.cpp.

◆ updateConnections()

virtual void Model::updateConnections ( )
pure virtual

Modifies connections between vertices based on current state of the network and behavior over the past epoch. Should be called once every epoch. might be similar to advance.

Implemented in CPUModel, and GPUModel.

◆ updateHistory()

void Model::updateHistory ( )
virtual

Update the simulation history of every epoch.

Log this simulation step.

Update the simulation history of every epoch.

Definition at line 141 of file Model.cpp.

Member Data Documentation

◆ connections_

unique_ptr<Connections> Model::connections_
protected

Definition at line 99 of file Model.h.

◆ fileLogger_

log4cplus::Logger Model::fileLogger_
protected

Definition at line 107 of file Model.h.

◆ layout_

unique_ptr<Layout> Model::layout_
protected

Definition at line 101 of file Model.h.

◆ recorder_

unique_ptr<Recorder> Model::recorder_
protected

Definition at line 103 of file Model.h.


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