Kaspersky Neuromorphic Platform  1.0.0
API Reference
Loading...
Searching...
No Matches
blifat_population.h
Go to the documentation of this file.
1
21#pragma once
22#include <knp/backends/cpu-library/impl/blifat_population_impl.h>
23#include <knp/backends/cpu-library/impl/synaptic_resource_stdp_impl.h>
24
29{
38template <class BlifatLikeNeuron>
39std::optional<core::messaging::SpikeMessage> calculate_blifat_population(
40 knp::core::Population<BlifatLikeNeuron> &population, knp::core::MessageEndpoint &endpoint, size_t step_n)
41{
42 return calculate_blifat_population_impl(population, endpoint, step_n);
43}
44
45
57template <class BlifatLikeNeuron, class BaseSynapseType, class ProjectionContainer>
58std::optional<core::messaging::SpikeMessage> calculate_resource_stdp_population(
59 knp::core::Population<neuron_traits::SynapticResourceSTDPNeuron<BlifatLikeNeuron>> &population,
60 ProjectionContainer &container, knp::core::MessageEndpoint &endpoint, size_t step_n)
61{
62 using StdpSynapseType = synapse_traits::STDP<synapse_traits::STDPSynapticResourceRule, BaseSynapseType>;
63 auto message_opt = calculate_blifat_population_impl(population, endpoint, step_n);
64 auto working_projections = find_projection_by_type_and_postsynaptic<StdpSynapseType, ProjectionContainer>(
65 container, population.get_uid(), true);
66 do_STDP_resource_plasticity(population, working_projections, message_opt, step_n);
67 return message_opt;
68}
69
70
80template <class BlifatLikeNeuron>
81std::optional<knp::core::messaging::SpikeMessage> calculate_blifat_population(
82 knp::core::Population<BlifatLikeNeuron> &population, knp::core::MessageEndpoint &endpoint, size_t step_n,
83 std::mutex &mutex)
84{
85 return calculate_blifat_population_impl(population, endpoint, step_n, mutex);
86}
87
88} // namespace knp::backends::cpu
Namespace for CPU backends.
std::optional< core::messaging::SpikeMessage > calculate_resource_stdp_population(knp::core::Population< neuron_traits::SynapticResourceSTDPNeuron< BlifatLikeNeuron > > &population, ProjectionContainer &container, knp::core::MessageEndpoint &endpoint, size_t step_n)
Make one execution step for a population of SynapticResourceSTDPNeuron neurons.
std::optional< core::messaging::SpikeMessage > calculate_blifat_population(knp::core::Population< BlifatLikeNeuron > &population, knp::core::MessageEndpoint &endpoint, size_t step_n)
Make one execution step for a population of BLIFAT neurons.