Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Public Member Functions | List of all members
auryn::DelayedSpikeMonitor Class Reference

SpikeMonitor that reads the delayed spikes as they are received by a postsynaptic neuron. More...

#include <DelayedSpikeMonitor.h>

Inheritance diagram for auryn::DelayedSpikeMonitor:
Inheritance graph
[legend]
Collaboration diagram for auryn::DelayedSpikeMonitor:
Collaboration graph
[legend]

Public Member Functions

 DelayedSpikeMonitor (SpikingGroup *source, std::string filename)
 
 DelayedSpikeMonitor (SpikingGroup *source, std::string filename, NeuronID to)
 
 DelayedSpikeMonitor (SpikingGroup *source, std::string filename, NeuronID from, NeuronID to)
 
void set_offset (NeuronID of)
 
virtual ~DelayedSpikeMonitor ()
 
void execute ()
 

Detailed Description

SpikeMonitor that reads the delayed spikes as they are received by a postsynaptic neuron.

Usually SpikeMonitor writes spikes to file for the rank that it runs on. i.e. each rank writes is own spk file which then need to be merged. This monitor writes all spikes from all ranks to files on all ranks. The spikes writen by this monitor are delayed by the axonal delay (because they need to be communicated from all ranks to all ranks first). The main role of this monitor is to test SyncBuffer and Auryn's spike synchornization. It records all the spikes on each node (which effectively multiplies spikes).

Constructor & Destructor Documentation

◆ DelayedSpikeMonitor() [1/3]

DelayedSpikeMonitor::DelayedSpikeMonitor ( SpikingGroup source,
std::string  filename 
)
43  : Monitor(filename)
44 {
45  init(source,filename,0,source->get_size());
46 }
void init()
Standard initializer to be called by the constructor.
Definition: Device.cpp:32
Monitor()
Constructor which does not open a text file for output.
Definition: Monitor.cpp:47
NeuronID get_size()
Returns the size of the group.
Definition: SpikingGroup.cpp:304
Here is the call graph for this function:

◆ DelayedSpikeMonitor() [2/3]

DelayedSpikeMonitor::DelayedSpikeMonitor ( SpikingGroup source,
std::string  filename,
NeuronID  to 
)
37  : Monitor(filename)
38 {
39  init(source,filename,0,to);
40 }
void init()
Standard initializer to be called by the constructor.
Definition: Device.cpp:32
Monitor()
Constructor which does not open a text file for output.
Definition: Monitor.cpp:47
Here is the call graph for this function:

◆ DelayedSpikeMonitor() [3/3]

DelayedSpikeMonitor::DelayedSpikeMonitor ( SpikingGroup source,
std::string  filename,
NeuronID  from,
NeuronID  to 
)
31  : Monitor(filename)
32 {
33  init(source,filename,from,to);
34 }
void init()
Standard initializer to be called by the constructor.
Definition: Device.cpp:32
Monitor()
Constructor which does not open a text file for output.
Definition: Monitor.cpp:47
Here is the call graph for this function:

◆ ~DelayedSpikeMonitor()

DelayedSpikeMonitor::~DelayedSpikeMonitor ( )
virtual
49 {
50  free();
51 }
Here is the call graph for this function:

Member Function Documentation

◆ execute()

void DelayedSpikeMonitor::execute ( )
virtual

Virtual execute function to be called at the end of central simulation loop in System

Reimplemented from auryn::Device.

76 {
77  for (it = src->get_spikes()->begin() ; it != src->get_spikes()->end() ; ++it ) {
78  if (*it >= n_from ) {
79  if ( *it < n_to )
80  outfile << auryn_timestep*(auryn::sys->get_clock()) << " " << *it+offset << "\n";
81  }
82  }
83 }
SpikeContainer * get_spikes()
Returns pointer to a spike container that contains spikes which arrive in this timestep from all neur...
Definition: SpikingGroup.cpp:245
std::ofstream outfile
Definition: Monitor.h:58
double auryn_timestep
Simulation timestep in seconds.
Definition: auryn_definitions.cpp:31
System * sys
Global pointer to instance of System which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:37
AurynTime get_clock()
Gets the current clock value in AurynTime.
Definition: System.cpp:231
Here is the call graph for this function:

◆ set_offset()

void DelayedSpikeMonitor::set_offset ( NeuronID  of)
71 {
72  offset = of;
73 }

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