Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JanVogelsang committed Jun 24, 2024
1 parent 0a1fee5 commit 5564296
Show file tree
Hide file tree
Showing 33 changed files with 90 additions and 161 deletions.
6 changes: 1 addition & 5 deletions models/bernoulli_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@ class bernoulli_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/clopath_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ class clopath_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
8 changes: 2 additions & 6 deletions models/cont_delay_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ class cont_delay_synapse : public Connection< targetidentifierT >
// they are not automatically found in the base class.
using ConnectionBase::get_delay_ms;
using ConnectionBase::get_delay_steps;
using ConnectionBase::set_delay_steps;
using ConnectionBase::get_rport;
using ConnectionBase::get_target;
using ConnectionBase::set_delay_steps;

//! Used by ConnectorModel::add_connection() for fast initialization
void
Expand Down Expand Up @@ -199,11 +199,7 @@ class cont_delay_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/diffusion_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ class diffusion_connection : public Connection< targetidentifierT >
using ConnectionBase::get_target;

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
DiffusionConnectionEvent ge;

Expand Down
6 changes: 1 addition & 5 deletions models/gap_junction.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,7 @@ class gap_junction : public Connection< targetidentifierT >
using ConnectionBase::get_target;

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
GapJunctionEvent ge;

Expand Down
6 changes: 1 addition & 5 deletions models/ht_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ class ht_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/jonke_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,7 @@ class jonke_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/static_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,7 @@ class static_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/static_synapse_hom_w.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ class static_synapse_hom_w : public Connection< targetidentifierT >
void get_status( DictionaryDatum& d ) const;

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/stdp_facetshw_synapse_hom.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,7 @@ class stdp_facetshw_synapse_hom : public Connection< targetidentifierT >
* \param receptor_type The ID of the requested receptor type
*/
void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/stdp_nn_pre_centered_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,7 @@ class stdp_nn_pre_centered_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/stdp_nn_restr_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ class stdp_nn_restr_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/stdp_nn_symm_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,7 @@ class stdp_nn_symm_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/stdp_pl_synapse_hom.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,7 @@ class stdp_pl_synapse_hom : public Connection< targetidentifierT >
* \param receptor_type The ID of the requested receptor type
*/
void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
13 changes: 8 additions & 5 deletions models/stdp_pl_synapse_hom_ax_delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void register_stdp_pl_synapse_hom_ax_delay( const std::string& name );
* Class representing an STDP connection with homogeneous parameters, i.e.
* parameters are the same for all synapses.
*/
template < typename targetidentifierT>
template < typename targetidentifierT >
class stdp_pl_synapse_hom_ax_delay : public Connection< targetidentifierT, AxonalDendriticDelay >
{

Expand Down Expand Up @@ -156,10 +156,10 @@ class stdp_pl_synapse_hom_ax_delay : public Connection< targetidentifierT, Axona
// ConnectionBase. This avoids explicit name prefixes in all places these
// functions are used. Since ConnectionBase depends on the template parameter,
// they are not automatically found in the base class.
using ConnectionBase::get_dendritic_delay_ms;
using ConnectionBase::get_dendritic_delay_steps;
using ConnectionBase::get_axonal_delay_ms;
using ConnectionBase::get_axonal_delay_steps;
using ConnectionBase::get_dendritic_delay_ms;
using ConnectionBase::get_dendritic_delay_steps;
using ConnectionBase::get_rport;
using ConnectionBase::get_target;

Expand Down Expand Up @@ -231,7 +231,9 @@ class stdp_pl_synapse_hom_ax_delay : public Connection< targetidentifierT, Axona
{
throw BadProperty( "Combination of axonal and dendritic delay has to be more than 0." );
}
t.register_stdp_connection( t_lastspike_ - get_dendritic_delay_ms() + get_axonal_delay_ms(), get_dendritic_delay_ms(), get_axonal_delay_ms() );
t.register_stdp_connection( t_lastspike_ - get_dendritic_delay_ms() + get_axonal_delay_ms(),
get_dendritic_delay_ms(),
get_axonal_delay_ms() );

CorrectionSpikeEvent e;
t.handles_test_event( e, receptor_type );
Expand Down Expand Up @@ -325,7 +327,8 @@ stdp_pl_synapse_hom_ax_delay< targetidentifierT >::send( Event& e,
// TODO: Move dynamic array pointer (per timestep) into handle-ringbuffer

// axonal_delay-dendritic_delay = total_delay-2*dendritic_delay
const long time_until_uncritical = e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ) - 2 * get_dendritic_delay_steps() + 1;
const long time_until_uncritical =
e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ) - 2 * get_dendritic_delay_steps() + 1;
// Only add correction entry if there could potentially be any post-synaptic spike that occurs before the
// pre-synaptic one arrives at the synapse. Has to be strictly greater than min_delay, because a post-synaptic spike
// at time slice_origin+min_delay corresponds to the last update step in the current slice (before delivery) and was
Expand Down
6 changes: 1 addition & 5 deletions models/stdp_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,7 @@ class stdp_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/stdp_synapse_hom.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,7 @@ class stdp_synapse_hom : public Connection< targetidentifierT >
* \param receptor_type The ID of the requested receptor type
*/
void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/stdp_triplet_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,7 @@ class stdp_triplet_synapse : public Connection< targetidentifierT >
* \param receptor_type The ID of the requested receptor type
*/
void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/tsodyks2_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,7 @@ class tsodyks2_synapse : public Connection< targetidentifierT >


void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/tsodyks_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,7 @@ class tsodyks_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/tsodyks_synapse_hom.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,7 @@ class tsodyks_synapse_hom : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;
ConnectionBase::check_connection_( dummy_target, s, t, syn_id, receptor_type );
Expand Down
6 changes: 1 addition & 5 deletions models/urbanczik_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,7 @@ class urbanczik_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
6 changes: 1 addition & 5 deletions models/vogels_sprekeler_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,7 @@ class vogels_sprekeler_synapse : public Connection< targetidentifierT >
};

void
check_connection( Node& s,
Node& t,
const size_t receptor_type,
const synindex syn_id,
const CommonPropertiesType& )
check_connection( Node& s, Node& t, const size_t receptor_type, const synindex syn_id, const CommonPropertiesType& )
{
ConnTestDummyNode dummy_target;

Expand Down
4 changes: 3 additions & 1 deletion nestkernel/archiving_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ ArchivingNode::pre_run_hook_()
}

void
ArchivingNode::register_stdp_connection( const double t_first_read, const double dendritic_delay, const double axonal_delay )
ArchivingNode::register_stdp_connection( const double t_first_read,
const double dendritic_delay,
const double axonal_delay )
{
// Mark all entries in the deque, which we will not read in future as read by
// this input, so that we safely increment the incoming number of
Expand Down
17 changes: 11 additions & 6 deletions nestkernel/archiving_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ class ArchivingNode : public StructuralPlasticityNode
* t_first_read: The newly registered synapse will read the history entries
* with t > t_first_read.
*/
void register_stdp_connection( const double t_first_read, const double dendritic_delay, const double axonal_delay ) override;
void register_stdp_connection( const double t_first_read,
const double dendritic_delay,
const double axonal_delay ) override;

void get_status( DictionaryDatum& d ) const override;
void set_status( const DictionaryDatum& d ) override;
Expand Down Expand Up @@ -166,18 +168,21 @@ class ArchivingNode : public StructuralPlasticityNode
*/
struct CorrectionEntrySTDPAxDelay
{
CorrectionEntrySTDPAxDelay( const size_t lcid, const synindex syn_id, const double t_last_pre_spike, const double weight_revert )
CorrectionEntrySTDPAxDelay( const size_t lcid,
const synindex syn_id,
const double t_last_pre_spike,
const double weight_revert )
: lcid_( lcid )
, syn_id_( syn_id )
, t_last_pre_spike_( t_last_pre_spike )
, weight_revert_( weight_revert )
{
}

unsigned int lcid_; //!< local connection index
synindex syn_id_; //!< synapse-type index
double t_last_pre_spike_; //!< time of the last pre-synaptic spike before this spike
double weight_revert_; //!< synaptic weight to revert to (STDP depression needs to be undone)
unsigned int lcid_; //!< local connection index
synindex syn_id_; //!< synapse-type index
double t_last_pre_spike_; //!< time of the last pre-synaptic spike before this spike
double weight_revert_; //!< synaptic weight to revert to (STDP depression needs to be undone)
};

//! check for correct correction entry size
Expand Down
Loading

0 comments on commit 5564296

Please sign in to comment.