22 namespace ModelProperty
43 virtual void apply(
double dt,
unsigned long long timestep) = 0;
46 Base(
double dt,
const pugi::xml_node &node, std::unique_ptr<InputValue::Base> value);
53 return (timestep >= m_StartTimeStep && timestep < m_EndTimeStep);
56 void updateValues(
double dt,
unsigned long long timestep,
57 std::function<
void(
unsigned int,
double)> applyValueFunc)
const;
63 unsigned long long m_StartTimeStep;
64 unsigned long long m_EndTimeStep;
66 std::unique_ptr<InputValue::Base> m_Value;
75 typedef void (*PushCurrentSpikesFunc)();
77 SpikeBase(
double dt,
const pugi::xml_node &node, std::unique_ptr<InputValue::Base> value,
78 unsigned int popSize,
unsigned int *spikeQueuePtr,
unsigned int *hostSpikeCount,
unsigned int *hostSpikes,
79 PushCurrentSpikesFunc pushCurrentSpikes);
84 void injectSpike(
unsigned int neuronID);
92 unsigned int getSpikeQueueIndex()
const 94 return (m_SpikeQueuePtr ==
nullptr) ? 0 : *m_SpikeQueuePtr;
100 const unsigned int m_PopSize;
102 unsigned int *m_SpikeQueuePtr;
103 unsigned int *m_HostSpikeCount;
104 unsigned int *m_HostSpikes;
105 PushCurrentSpikesFunc m_PushCurrentSpikes;
117 virtual void apply(
double dt,
unsigned long long timestep)
override;
121 unsigned int popSize,
unsigned int *spikeQueuePtr,
unsigned int *hostSpikeCount,
unsigned int *hostSpikes,
122 PushCurrentSpikesFunc pushCurrentSpikes);
127 virtual double getTimeToSpike(
double isiMs) = 0;
133 std::map<unsigned int, std::pair<double, double>> m_TimeToSpike;
142 RegularSpikeRate(
double dt,
const pugi::xml_node &node, std::unique_ptr<InputValue::Base> value,
143 unsigned int popSize,
unsigned int *spikeQueuePtr,
unsigned int *hostSpikeCount,
unsigned int *hostSpikes,
144 PushCurrentSpikesFunc pushCurrentSpikes);
150 virtual double getTimeToSpike(
double isiMs)
override;
159 PoissonSpikeRate(
double dt,
const pugi::xml_node &node, std::unique_ptr<InputValue::Base> value,
160 unsigned int popSize,
unsigned int *spikeQueuePtr,
unsigned int *hostSpikeCount,
unsigned int *hostSpikes,
161 PushCurrentSpikesFunc pushCurrentSpikes);
167 virtual double getTimeToSpike(
double isiMs);
173 std::mt19937 m_RandomGenerator;
182 SpikeTime(
double dt,
const pugi::xml_node &node, std::unique_ptr<InputValue::Base> value,
183 unsigned int popSize,
unsigned int *spikeQueuePtr,
unsigned int *hostSpikeCount,
unsigned int *hostSpikes,
184 PushCurrentSpikesFunc pushCurrentSpikes);
189 virtual void apply(
double dt,
unsigned long long timestep)
override;
198 Analogue(
double dt,
const pugi::xml_node &node, std::unique_ptr<InputValue::Base> value,
204 virtual void apply(
double dt,
unsigned long long timestep)
override;
211 bool m_PropertyUpdateRequired;
216 std::map<unsigned int, double> m_CurrentValues;
Definition: modelProperty.h:30
Definition: connectors.h:25
Definition: connectors.h:12