Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
RecordableVector< T > Class Template Reference
Inheritance diagram for RecordableVector< T >:
Collaboration diagram for RecordableVector< T >:

Public Member Functions

 RecordableVector ()
 Constructor.
 
virtual void setDataType () override
 
virtual const std::string & getDataType () const override
 Get a string representing the data type of the recordable variable.
 
virtual int getNumElements () const override
 Get the number of elements that needs to be recorded.
 
virtual void startNewEpoch () override
 Start a new epoch for the recordable variable.
 
virtual variantTypes getElement (int index) const override
 
virtual void resize (int maxEvents)
 Resize the eventTimeSteps vector to the specified size.
 
T & operator[] (int index)
 Overload the operator to set the value at a specific index.
 
const std::vector< T > & getVector () const
 Method to retrieve the underlying std::vector<T>
 
template<class Archive >
void serialize (Archive &archive)
 Cereal serialization method.
 
- Public Member Functions inherited from RecordableBase
template<class Archive >
void serialize (Archive &archive)
 Cereal serialization method.
 

Protected Attributes

vector< T > dataSeries_
 Holds the event time steps.
 
- Protected Attributes inherited from RecordableBase
std::string basicDataType_
 the basic data type in the recorded variable
 

Additional Inherited Members

- Protected Member Functions inherited from RecordableBase
 RecordableBase ()=default
 prevents any code outside this class from creating a RecordableBase object
 

Detailed Description

template<typename T>
class RecordableVector< T >

Definition at line 22 of file RecordableVector.h.

Constructor & Destructor Documentation

◆ RecordableVector()

template<typename T >
RecordableVector< T >::RecordableVector ( )
inline

Constructor.

Definition at line 25 of file RecordableVector.h.

Member Function Documentation

◆ getDataType()

template<typename T >
virtual const std::string & RecordableVector< T >::getDataType ( ) const
inlineoverridevirtual

Get a string representing the data type of the recordable variable.

Implements RecordableBase.

Reimplemented in EventBuffer.

Definition at line 38 of file RecordableVector.h.

◆ getElement()

template<typename T >
virtual variantTypes RecordableVector< T >::getElement ( int index) const
inlineoverridevirtual

Get the value of the recordable variable at the specified index. return A variant representing the recorded value (uint64_t, double, or string)

Implements RecordableBase.

Reimplemented in EventBuffer.

Definition at line 57 of file RecordableVector.h.

◆ getNumElements()

template<typename T >
virtual int RecordableVector< T >::getNumElements ( ) const
inlineoverridevirtual

Get the number of elements that needs to be recorded.

Implements RecordableBase.

Reimplemented in EventBuffer.

Definition at line 44 of file RecordableVector.h.

◆ getVector()

template<typename T >
const std::vector< T > & RecordableVector< T >::getVector ( ) const
inline

Method to retrieve the underlying std::vector<T>

Definition at line 79 of file RecordableVector.h.

◆ operator[]()

template<typename T >
T & RecordableVector< T >::operator[] ( int index)
inline

Overload the operator to set the value at a specific index.

Definition at line 69 of file RecordableVector.h.

◆ resize()

template<typename T >
virtual void RecordableVector< T >::resize ( int maxEvents)
inlinevirtual

Resize the eventTimeSteps vector to the specified size.

Reimplemented in EventBuffer.

Definition at line 63 of file RecordableVector.h.

◆ serialize()

template<typename T >
template<class Archive >
void RecordableVector< T >::serialize ( Archive & archive)
inline

Cereal serialization method.

Definition at line 85 of file RecordableVector.h.

◆ setDataType()

template<typename T >
virtual void RecordableVector< T >::setDataType ( )
inlineoverridevirtual

Set up a string representing the basic data type Return a run time type info

Implements RecordableBase.

Reimplemented in EventBuffer.

Definition at line 32 of file RecordableVector.h.

◆ startNewEpoch()

template<typename T >
virtual void RecordableVector< T >::startNewEpoch ( )
inlineoverridevirtual

Start a new epoch for the recordable variable.

Implements RecordableBase.

Reimplemented in EventBuffer.

Definition at line 50 of file RecordableVector.h.

Member Data Documentation

◆ dataSeries_

template<typename T >
vector<T> RecordableVector< T >::dataSeries_
protected

Holds the event time steps.

Definition at line 93 of file RecordableVector.h.


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