Skip to content

Commit d3e0232

Browse files
committed
Merge branch 'master' of github.com:JanVogelsang/nest-simulator into nest-master
2 parents 390064e + 649a448 commit d3e0232

9 files changed

+95
-101
lines changed

models/glif_cond.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -800,12 +800,4 @@ nest::glif_cond::handle( CurrentEvent& e )
800800
e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_current() );
801801
}
802802

803-
// TODO JV
804-
// Do not move this function as inline to h-file. It depends on universal_data_logger.h being included here.
805-
void
806-
nest::glif_cond::handle( DataLoggingRequest& e )
807-
{
808-
B_.logger_.handle( e ); // the logger does this for us
809-
}
810-
811803
#endif // HAVE_GSL

models/glif_cond.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,12 @@ glif_cond::set_status( const DictionaryDatum& d )
527527
S_ = stmp;
528528
}
529529

530+
inline void
531+
nest::glif_cond::handle( DataLoggingRequest& e )
532+
{
533+
B_.logger_.handle( e ); // the logger does this for us
534+
}
535+
530536
} // namespace nest
531537

532538
#endif // HAVE_GSL

models/glif_psc_double_alpha.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -695,11 +695,3 @@ nest::glif_psc_double_alpha::handle( CurrentEvent& e )
695695
B_.currents_.add_value(
696696
e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_current() );
697697
}
698-
699-
// TODO JV
700-
// Do not move this function as inline to h-file. It depends on universal_data_logger.h being included here.
701-
void
702-
nest::glif_psc_double_alpha::handle( DataLoggingRequest& e )
703-
{
704-
B_.logger_.handle( e ); // the logger does this for us
705-
}

models/glif_psc_double_alpha.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,12 @@ glif_psc_double_alpha::set_status( const DictionaryDatum& d )
493493
S_ = stmp;
494494
}
495495

496+
inline void
497+
glif_psc_double_alpha::handle( DataLoggingRequest& e )
498+
{
499+
B_.logger_.handle( e ); // the logger does this for us
500+
}
501+
496502
} // namespace nest
497503

498504
#endif

models/iaf_bw_2001.cpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -484,41 +484,5 @@ nest::iaf_bw_2001::update( Time const& origin, const long from, const long to )
484484
}
485485
}
486486

487-
// TODO JV
488-
// Do not move this function as inline to h-file. It depends on universal_data_logger.h being included here.
489-
void
490-
nest::iaf_bw_2001::handle( DataLoggingRequest& e )
491-
{
492-
B_.logger_.handle( e );
493-
}
494-
495-
void
496-
nest::iaf_bw_2001::handle( SpikeEvent& e )
497-
{
498-
assert( e.get_delay_steps() > 0 );
499-
500-
const double steps = e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() );
501-
502-
const auto rport = e.get_rport();
503-
504-
if ( rport < NMDA )
505-
{
506-
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() );
507-
}
508-
else
509-
{
510-
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() * e.get_offset() );
511-
}
512-
}
513-
514-
void
515-
nest::iaf_bw_2001::handle( CurrentEvent& e )
516-
{
517-
assert( e.get_delay_steps() > 0 );
518-
519-
B_.currents_.add_value(
520-
e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_current() );
521-
}
522-
523487
#endif // HAVE_BOOST
524488
#endif // HAVE_GSL

models/iaf_bw_2001.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,41 @@ iaf_bw_2001::set_status( const DictionaryDatum& d )
523523
P_ = ptmp;
524524
S_ = stmp;
525525
};
526+
527+
inline void
528+
iaf_bw_2001::handle( DataLoggingRequest& e )
529+
{
530+
B_.logger_.handle( e );
531+
}
532+
533+
inline void
534+
iaf_bw_2001::handle( SpikeEvent& e )
535+
{
536+
assert( e.get_delay_steps() > 0 );
537+
538+
const double steps = e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() );
539+
540+
const auto rport = e.get_rport();
541+
542+
if ( rport < NMDA )
543+
{
544+
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() );
545+
}
546+
else
547+
{
548+
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() * e.get_offset() );
549+
}
550+
}
551+
552+
inline void
553+
iaf_bw_2001::handle( CurrentEvent& e )
554+
{
555+
assert( e.get_delay_steps() > 0 );
556+
557+
B_.currents_.add_value(
558+
e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_current() );
559+
}
560+
526561
} // namespace
527562

528563
#endif // HAVE_BOOST

models/iaf_bw_2001_exact.cpp

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -515,53 +515,4 @@ nest::iaf_bw_2001_exact::update( Time const& origin, const long from, const long
515515
}
516516
}
517517

518-
// TODO JV
519-
// Do not move this function as inline to h-file. It depends on universal_data_logger.h being included here.
520-
void
521-
nest::iaf_bw_2001_exact::handle( DataLoggingRequest& e )
522-
{
523-
B_.logger_.handle( e );
524-
}
525-
526-
void
527-
nest::iaf_bw_2001_exact::handle( SpikeEvent& e )
528-
{
529-
assert( e.get_delay_steps() > 0 );
530-
assert( e.get_rport() <= static_cast< int >( B_.spikes_.size() ) );
531-
532-
const double steps = e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() );
533-
const auto rport = e.get_rport();
534-
535-
if ( rport < NMDA )
536-
{
537-
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() );
538-
}
539-
else
540-
// we need to scale each individual S_j variable by its weight,
541-
// so we store them
542-
{
543-
B_.spikes_[ rport - 1 ].add_value( steps, e.get_multiplicity() );
544-
// since we scale entire S_j variable by the weight it also affects previous spikes.
545-
// we therefore require them to be constant.
546-
const size_t w_idx = rport - NMDA;
547-
if ( B_.weights_[ w_idx ] == 0 )
548-
{
549-
B_.weights_[ w_idx ] = e.get_weight();
550-
}
551-
else if ( B_.weights_[ w_idx ] != e.get_weight() )
552-
{
553-
throw KernelException( "iaf_bw_2001_exact requires constant weights." );
554-
}
555-
}
556-
}
557-
558-
void
559-
nest::iaf_bw_2001_exact::handle( CurrentEvent& e )
560-
{
561-
assert( e.get_delay_steps() > 0 );
562-
563-
B_.currents_.add_value(
564-
e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_current() );
565-
}
566-
567518
#endif // HAVE_GSL

models/iaf_bw_2001_exact.h

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,54 @@ iaf_bw_2001_exact::set_status( const DictionaryDatum& d )
540540
P_ = ptmp;
541541
S_ = stmp;
542542
};
543+
544+
inline void
545+
nest::iaf_bw_2001_exact::handle( DataLoggingRequest& e )
546+
{
547+
B_.logger_.handle( e );
548+
}
549+
550+
inline void
551+
nest::iaf_bw_2001_exact::handle( SpikeEvent& e )
552+
{
553+
assert( e.get_delay_steps() > 0 );
554+
assert( e.get_rport() <= static_cast< int >( B_.spikes_.size() ) );
555+
556+
const double steps = e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() );
557+
const auto rport = e.get_rport();
558+
559+
if ( rport < NMDA )
560+
{
561+
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() );
562+
}
563+
else
564+
// we need to scale each individual S_j variable by its weight,
565+
// so we store them
566+
{
567+
B_.spikes_[ rport - 1 ].add_value( steps, e.get_multiplicity() );
568+
// since we scale entire S_j variable by the weight it also affects previous spikes.
569+
// we therefore require them to be constant.
570+
const size_t w_idx = rport - NMDA;
571+
if ( B_.weights_[ w_idx ] == 0 )
572+
{
573+
B_.weights_[ w_idx ] = e.get_weight();
574+
}
575+
else if ( B_.weights_[ w_idx ] != e.get_weight() )
576+
{
577+
throw KernelException( "iaf_bw_2001_exact requires constant weights." );
578+
}
579+
}
580+
}
581+
582+
inline void
583+
nest::iaf_bw_2001_exact::handle( CurrentEvent& e )
584+
{
585+
assert( e.get_delay_steps() > 0 );
586+
587+
B_.currents_.add_value(
588+
e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_current() );
589+
}
590+
543591
} // namespace
544592

545593
#endif // HAVE_GSL

models/quantal_stp_synapse_impl.h

Whitespace-only changes.

0 commit comments

Comments
 (0)