CARLsim
5.0.0
CARLsim: a GPU-accelerated SNN simulator
|
Go to the documentation of this file.
50 #ifndef _SPIKE_MON_CORE_H_
51 #define _SPIKE_MON_CORE_H_
155 void print(
bool printSpikeTimes);
158 void pushAER(
int time,
int neurId);
204 void calculateFiringRates();
207 void sortFiringRates();
210 void writeSpikeFileHeader();
213 bool needToCalculateFiringRates_;
216 bool needToSortFiringRates_;
219 bool needToWriteFileHeader_;
227 int spikeFileSignature_;
228 float spikeFileVersion_;
231 std::vector<std::vector<int> > spkVector_;
233 std::vector<float> firingRates_;
234 std::vector<float> firingRatesSorted_;
238 long int startTimeLast_;
243 long int spkMonLastUpdated_;
246 bool persistentData_;
249 bool userHasBeenWarned_;
long int getAccumTime()
returns the total accumulated time
long int getRecordingLastStartTime()
returns the timestamp of the last startRecording in ms
long int getRecordingStartTime()
retunrs the timestamp of the first startRecording in ms
float getMinFiringRate()
returns the smallest recorded firing rate
~SpikeMonitorCore()
destructor, cleans up all the memory upon object deletion
void pushAER(int time, int neurId)
inserts a (time,neurId) tupel into the 2D spike vector
void print(bool printSpikeTimes)
prints the AER vector in human-readable format
bool isRecording()
returns recording status
int getPopNumSpikes()
returns the total number of recorded spikes in the group
bool getPersistentData()
returns status of PersistentData mode
float getPopStdFiringRate()
computes the standard deviation of firing rates in the group
void setMode(SpikeMonMode mode)
sets recording mode
long int getBufferSize()
returns the approximate size of the spike vector in bytes
int getGrpNumNeurons()
returns number of neurons in the group
std::vector< float > getAllFiringRates()
returns a list of firing rates for all neurons in the group (sorted by neuron ID ascending)
float getPopMeanFiringRate()
returns the recorded mean firing rate of the group
long int getRecordingStopTime()
returns the timestamp of stopRecording
void stopRecording()
stops recording AER data
long int getRecordingTotalTime()
returns the total recorded time in ms
SpikeMonitorCore(SNN *snn, int monitorId, int grpId)
constructor (called by CARLsim::setSpikeMonitor)
float getPercentSilentNeurons()
returns percentage of neurons that didn't spike during recording
int getNumNeuronsWithFiringRate(float min, float max)
returns number of neurons whose firing rate was in [min,max] during recording
std::vector< float > getAllFiringRatesSorted()
returns a list of firing rates for all neurons in the group (sorted by firing rate ascending)
int getNumSilentNeurons()
returns number of neurons that didn't spike while recording
SpikeMonMode
SpikeMonitor mode.
void setLastUpdated(long int lastUpdate)
sets timestamp of last SpikeMonitor update
FILE * getSpikeFileId()
returns a pointer to the spike file
bool isBufferBig()
returns true if spike buffer is close to maxAllowedBufferSize
void clear()
deletes data from the 2D spike vector
SpikeMonMode getMode()
returns recording mode
int getGrpId()
returns the group ID
int getNeuronNumSpikes(int neurId)
returns the number of recorded spikes of a specific neuron
void setSpikeFileId(FILE *spikeFileId)
sets pointer to spike file
Contains all of CARLsim's core functionality.
float getNeuronMeanFiringRate(int neurId)
returns the recorded mean firing rate for a specific neuron
std::vector< std::vector< int > > getSpikeVector2D()
returns the 2D AER vector
long int getLastUpdated()
returns timestamp of last SpikeMonitor update
int getMonitorId()
returns the SpikeMonitor ID
float getMaxFiringRate()
returns the largest recorded firing rate
void setPersistentData(bool persistentData)
sets status of PersistentData mode
float getPercentNeuronsWithFiringRate(float min, float max)
returns percentage of neurons whose firing rate was in [min,max] during recording
void startRecording()
starts recording AER data