File tree Expand file tree Collapse file tree
cpu-library/include/knp/backends/cpu-library/impl/populations/altai
cpu-single-threaded-backend
include/knp/backends/cpu-single-threaded Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,17 @@ inline void calculate_pre_impact_single_neuron_state_dispatch(
4141}
4242
4343
44+ /* *
45+ * @brief Calculate pre impact state of single neuron.
46+ * @param neuron Neuron.
47+ */
48+ inline void calculate_pre_impact_single_neuron_state_dispatch (
49+ knp::neuron_traits::neuron_parameters<knp::neuron_traits::SynapticResourceSTDPAltAILIFNeuron> &neuron)
50+ {
51+ altai::calculate_pre_impact_single_neuron_state_impl (neuron);
52+ }
53+
54+
4455/* *
4556 * @brief Impact neuron.
4657 * @param neuron Neuron.
Original file line number Diff line number Diff line change @@ -241,6 +241,17 @@ std::optional<core::messaging::SpikeMessage> SingleThreadedCPUBackend::calculate
241241}
242242
243243
244+ std::optional<core::messaging::SpikeMessage> SingleThreadedCPUBackend::calculate_population (
245+ core::Population<neuron_traits::SynapticResourceSTDPAltAILIFNeuron> &population)
246+ {
247+ SPDLOG_TRACE (
248+ " Calculate resource-based STDP-compatible AltAI-LIF population {}." , std::string (population.get_uid ()));
249+ return knp::backends::cpu::calculate_resource_stdp_population<
250+ neuron_traits::AltAILIF, synapse_traits::DeltaSynapse, ProjectionContainer>(
251+ population, projections_, get_message_endpoint (), get_step ());
252+ }
253+
254+
244255void SingleThreadedCPUBackend::calculate_projection (
245256 knp::core::Projection<knp::synapse_traits::DeltaSynapse> &projection, SynapticMessageQueue &message_queue)
246257{
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class KNP_DECLSPEC SingleThreadedCPUBackend : public knp::core::Backend
5757 */
5858 using SupportedNeurons = boost::mp11::mp_list<
5959 knp::neuron_traits::BLIFATNeuron, knp::neuron_traits::SynapticResourceSTDPBLIFATNeuron,
60- knp::neuron_traits::AltAILIF>;
60+ knp::neuron_traits::AltAILIF, knp::neuron_traits::SynapticResourceSTDPAltAILIFNeuron >;
6161
6262 /* *
6363 * @brief List of synapse types supported by the single-threaded CPU backend.
@@ -346,6 +346,17 @@ class KNP_DECLSPEC SingleThreadedCPUBackend : public knp::core::Backend
346346 std::optional<core::messaging::SpikeMessage> calculate_population (
347347 knp::core::Population<knp::neuron_traits::AltAILIF> &population);
348348
349+
350+ /* *
351+ * @brief Calculate population of 'AltAILIF' neurons.
352+ * @note Population state will be changed during calculation.
353+ * @param population population to calculate.
354+ * @return spike message with indexes of spiked neurons if population is emitting one.
355+ */
356+ std::optional<core::messaging::SpikeMessage> calculate_population (
357+ knp::core::Population<knp::neuron_traits::SynapticResourceSTDPAltAILIFNeuron> &population);
358+
359+
349360 /* *
350361 * @brief Calculate projection of delta synapses.
351362 * @note Projection will be changed during calculation.
You can’t perform that action at this time.
0 commit comments