Skip to content

Commit

Permalink
Format files using clang-format 3.6.0
Browse files Browse the repository at this point in the history
The version in Fedora is 3.7.x which was causing the tests to fail.
  • Loading branch information
sanjayankur31 committed Feb 2, 2016
1 parent 1c78eb9 commit 92b55b6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
8 changes: 5 additions & 3 deletions models/modelsmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,16 @@ ModelsModule::init( SLIInterpreter* )
"stdp_dopamine_synapse_hpc" );

/* BeginDocumentation
Name: stdp_symmetric_synapse_hpc - Variant of stdp_symmetric_synapse with low memory consumption.
Name: stdp_symmetric_synapse_hpc - Variant of stdp_symmetric_synapse with low memory
consumption.
SeeAlso: synapsedict, stdp_symmetric_synapse
*/
kernel()
.model_manager.register_connection_model< STDPSymmetricConnection< TargetIdentifierPtrRport > >(
"stdp_symmetric_synapse" );
kernel().model_manager.register_connection_model< STDPSymmetricConnection< TargetIdentifierIndex > >(
"stdp_symmetric_synapse_hpc" );
kernel()
.model_manager.register_connection_model< STDPSymmetricConnection< TargetIdentifierIndex > >(
"stdp_symmetric_synapse_hpc" );
}

} // namespace nest
23 changes: 11 additions & 12 deletions models/stdp_symmetric_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,14 @@ class STDPSymmetricConnection : public Connection< targetidentifierT >
double_t
facilitate_( double_t w, double_t kplus )
{
double_t norm_w =
( w / Wmax_ ) + ( lambda_ * eta_ * kplus );
double_t norm_w = ( w / Wmax_ ) + ( lambda_ * eta_ * kplus );
return norm_w < 1.0 ? norm_w * Wmax_ : Wmax_;
}

double_t
depress_( double_t w )
{
double_t norm_w =
( w / Wmax_ ) - ( 2.* kappa_ * tau_ * lambda_ * eta_ );
double_t norm_w = ( w / Wmax_ ) - ( 2. * kappa_ * tau_ * lambda_ * eta_ );
return norm_w > 0.0 ? norm_w * Wmax_ : 0.0;
}

Expand Down Expand Up @@ -213,8 +211,8 @@ STDPSymmetricConnection< targetidentifierT >::send( Event& e,
{
minus_dt = t_lastspike - ( start->t_ + dendritic_delay );
++start;
if (minus_dt == 0)
continue;
if ( minus_dt == 0 )
continue;
// Use value of kplus at the time of the post synaptic spike
// therefore the exponential multiplier
// for minus_dt = 0, the exponential becomes 1 and facilitation occurs
Expand All @@ -227,7 +225,7 @@ STDPSymmetricConnection< targetidentifierT >::send( Event& e,
// Facilitation and constant depression
// Getting kvalue at required time already for deferred processing, so no
// need to transform it to the current time, and so, no exponential required
weight_ = facilitate_( weight_, target->get_K_value( t_spike - dendritic_delay) );
weight_ = facilitate_( weight_, target->get_K_value( t_spike - dendritic_delay ) );
weight_ = depress_( weight_ );

e.set_receiver( *target );
Expand All @@ -248,8 +246,8 @@ STDPSymmetricConnection< targetidentifierT >::STDPSymmetricConnection()
, weight_( 0.5 )
, tau_( 20.0 )
, lambda_( 0.01 )
, kappa_ ( 3. )
, eta_ ( 0.001 )
, kappa_( 3. )
, eta_( 0.001 )
, Wmax_( 1.0 )
, Kplus_( 0.0 )
{
Expand All @@ -262,8 +260,8 @@ STDPSymmetricConnection< targetidentifierT >::STDPSymmetricConnection(
, weight_( rhs.weight_ )
, tau_( rhs.tau_ )
, lambda_( rhs.lambda_ )
, kappa_ (rhs.kappa_ )
, eta_ (rhs.eta_ )
, kappa_( rhs.kappa_ )
, eta_( rhs.eta_ )
, Wmax_( rhs.Wmax_ )
, Kplus_( rhs.Kplus_ )
{
Expand All @@ -285,7 +283,8 @@ STDPSymmetricConnection< targetidentifierT >::get_status( DictionaryDatum& d ) c

template < typename targetidentifierT >
void
STDPSymmetricConnection< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
STDPSymmetricConnection< targetidentifierT >::set_status( const DictionaryDatum& d,
ConnectorModel& cm )
{
ConnectionBase::set_status( d, cm );
updateValue< double_t >( d, names::weight, weight_ );
Expand Down

0 comments on commit 92b55b6

Please sign in to comment.