GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
spikeRecorder.h File Reference
#include <algorithm>
#include <fstream>
#include <iterator>
#include <list>
#include <string>
#include <tuple>
#include <vector>
#include <cassert>
#include <cstdint>

Go to the source code of this file.

Classes

class  SpikeWriterText
 Class to write spikes to text file. More...
 
class  SpikeWriterTextCached
 Class to write spikes to text file, caching in memory before writing. More...
 
class  SpikeRecorder< Writer >
 Class to read spikes from neuron groups. More...
 

Functions

void writeBinarySpikeRecording (const std::string &filename, const uint32_t *spkRecord, unsigned int popSize, unsigned int numTimesteps, bool append=false)
 Writes spikes recorded using GeNN's spike timing sytem directly to binary file. More...
 
int _clz (unsigned int value)
 
void writeTextSpikeRecording (const std::string &filename, const uint32_t *spkRecord, unsigned int popSize, unsigned int numTimesteps, double dt=1.0, const std::string &delimiter=" ", bool header=false, bool append=false, double startTime=0.0)
 

Function Documentation

◆ _clz()

int _clz ( unsigned int  value)
inline

◆ writeBinarySpikeRecording()

void writeBinarySpikeRecording ( const std::string &  filename,
const uint32_t *  spkRecord,
unsigned int  popSize,
unsigned int  numTimesteps,
bool  append = false 
)
inline

Writes spikes recorded using GeNN's spike timing sytem directly to binary file.

Parameters
filenamestring containing filename to write to.
spkRecordpointer to spike recording data to write (accessable via recordSpk<neuron group name> or recordSpkEvent<neuron group name>).
popSizenumber of neurons in population
numTimestepshow many timesteps were recorded (should match the value passed to allocateRecordingBuffers).
appendboolean specifying whether to overwrite or append to any existing file called filename.

◆ writeTextSpikeRecording()

void writeTextSpikeRecording ( const std::string &  filename,
const uint32_t *  spkRecord,
unsigned int  popSize,
unsigned int  numTimesteps,
double  dt = 1.0,
const std::string &  delimiter = " ",
bool  header = false,
bool  append = false,
double  startTime = 0.0 
)
inline

Writes spikes recorded using GeNN's spike timing sytem directly to text file with one column containing spike times in ms and one neuron ids

Parameters
filenamestring containing filename to write to.
spkRecordpointer to spike recording data to write (accessable via recordSpk<neuron group name> or recordSpkEvent<neuron group name>).
popSizenumber of neurons in population
numTimestepsnumber of timesteps recorded
dtdouble precision number specifying size of each timestep
delimiterstring specifying character(s) which should appear between columns in text file
headerboolean specifying whether to write a header row at start of text file or not
appendboolean specifying whether to overwrite or append to any existing file called filename.
startTimedouble precision number specifying start time of current data.