Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f4b4941
Fixed horrible kernel_manager singleton design and cleaned up all cir…
JanVogelsang Aug 8, 2025
4d545f5
Delete models/quantal_stp_synapse_impl.h
JanVogelsang Aug 10, 2025
649a448
Made previously non-inlinable functions inline
JanVogelsang Aug 10, 2025
390064e
Added static modifier
JanVogelsang Aug 11, 2025
d3e0232
Merge branch 'master' of github.com:JanVogelsang/nest-simulator into …
JanVogelsang Aug 11, 2025
1eded20
Simplified get_process_id_of_node_id implementation
JanVogelsang Aug 11, 2025
98c6275
Fixed remaining bugs
JanVogelsang Aug 12, 2025
a63d91c
Removed nest_impl.h
JanVogelsang Aug 12, 2025
957b2f3
Moved from a composite singleton to inline globals
JanVogelsang Aug 12, 2025
27358c0
Minimized layer_impl.h
JanVogelsang Aug 13, 2025
d85b30e
Minimized layer_impl.h
JanVogelsang Aug 13, 2025
cd6271f
Update models/CMakeLists.txt
JanVogelsang Aug 13, 2025
6ebf55f
Fixed cherry-pick issue
JanVogelsang Aug 13, 2025
9884718
Fixed non-MPI version
JanVogelsang Aug 13, 2025
0f6edd9
Merge branch 'master' of github.com:JanVogelsang/nest-simulator into …
JanVogelsang Aug 13, 2025
691c39b
Update models/CMakeLists.txt
JanVogelsang Aug 13, 2025
4f102e1
Fixed non-MPI version
JanVogelsang Aug 13, 2025
076e11a
Fixed conngen
JanVogelsang Aug 13, 2025
0313d49
Fixed sonata
JanVogelsang Aug 13, 2025
e2ae1f3
Fixed conngen
JanVogelsang Aug 13, 2025
e02482f
Fixed sonata
JanVogelsang Aug 13, 2025
5c54119
Fixed sionlib
JanVogelsang Aug 13, 2025
508e349
Fixed sionlib
JanVogelsang Aug 13, 2025
ba7cfc6
Attempting to fix macos issue
JanVogelsang Aug 13, 2025
67f510f
Changed manager access syntax
JanVogelsang Aug 21, 2025
5f14394
Merge branch 'nest-master-inline' into nest-master
JanVogelsang Aug 21, 2025
050b301
Merged master
JanVogelsang Sep 18, 2025
545e34f
Merge remote-tracking branch 'nest-master/master' into nest-master
JanVogelsang Sep 18, 2025
95946a6
Attempting to fix weird compiler issue in testsuite
JanVogelsang Sep 18, 2025
8a65936
Attempting to fix weird compiler issue in testsuite
JanVogelsang Sep 18, 2025
95abad7
Update nestkernel/layer_impl.h
JanVogelsang Sep 22, 2025
3030c8a
Update nestkernel/layer_impl.h
JanVogelsang Sep 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
632 changes: 457 additions & 175 deletions doc/htmldoc/developer_space/guidelines/coding_guidelines_cpp.rst

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion doc/htmldoc/networks/spatially_structured_networks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,6 @@ files for the ``Mask`` parent class:
.. code:: c

#include "mask.h"
#include "mask_impl.h"

The ``Mask`` class has a few methods that must be overridden:

Expand Down
2 changes: 1 addition & 1 deletion libnestutil/dict_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

// Includes from nestkernel:
#include "kernel_manager.h"
#include "nest.h"
#include "nest_datums.h"
#include "vp_manager_impl.h"

// Includes from sli:
#include "dictdatum.h"
Expand Down
8 changes: 4 additions & 4 deletions models/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ set(models_sources
weight_recorder.h weight_recorder.cpp # Required by CommonSynapseProperties
cm_compartmentcurrents.h cm_compartmentcurrents.cpp
cm_tree.h cm_tree.cpp
rate_neuron_ipn.h rate_neuron_ipn_impl.h
rate_neuron_opn.h rate_neuron_opn_impl.h
rate_transformer_node.h rate_transformer_node_impl.h
weight_optimizer.h weight_optimizer.cpp
rate_neuron_ipn.h
rate_neuron_opn.h
rate_transformer_node.h
weight_optimizer.h weight_optimizer.cpp
${MODELS_SOURCES_GENERATED}
)

Expand Down
4 changes: 1 addition & 3 deletions models/ac_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
#include "numerics.h"

// Includes from nestkernel:
#include "event_delivery_manager_impl.h"
#include "event_delivery_manager.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dict.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_cond_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "nest_names.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_cond_alpha_astro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "nest_names.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_cond_alpha_multisynapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dict.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_cond_beta_multisynapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dict.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_cond_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "nest_names.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_psc_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "nest_names.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_psc_delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "nest_names.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_psc_delta_clopath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "nest_names.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/aeif_psc_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "nest_names.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/amat2_psc_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
2 changes: 0 additions & 2 deletions models/astrocyte_lr_1994.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dictutils.h"
Expand Down
3 changes: 0 additions & 3 deletions models/bernoulli_synapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@

#include "bernoulli_synapse.h"

// Includes from nestkernel:
#include "nest_impl.h"

void
nest::register_bernoulli_synapse( const std::string& name )
{
Expand Down
1 change: 0 additions & 1 deletion models/binary_neuron.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "archiving_node.h"
#include "connection.h"
#include "event.h"
#include "event_delivery_manager_impl.h"
#include "exceptions.h"
#include "kernel_manager.h"
#include "nest_timeconverter.h"
Expand Down
3 changes: 0 additions & 3 deletions models/clopath_synapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@

#include "clopath_synapse.h"

// Includes from nestkernel:
#include "nest_impl.h"

void
nest::register_clopath_synapse( const std::string& name )
{
Expand Down
2 changes: 2 additions & 0 deletions models/cm_compartmentcurrents.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include <stdlib.h>

#include "logging.h"
#include "logging_manager.h"
#include "ring_buffer.h"

namespace nest
Expand Down
3 changes: 0 additions & 3 deletions models/cm_default.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@

#include "cm_default.h"

// Includes from nestkernel:
#include "nest_impl.h"

namespace nest
{
void
Expand Down
3 changes: 3 additions & 0 deletions models/cm_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
*/
#include "cm_tree.h"

#include "logging.h"
#include "logging_manager.h"


nest::Compartment::Compartment( const long compartment_index, const long parent_index )
: xx_( 0.0 )
Expand Down
1 change: 0 additions & 1 deletion models/cm_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
// Includes from nestkernel:
#include "exceptions.h"
#include "kernel_manager.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
#include "dict.h"
Expand Down
4 changes: 0 additions & 4 deletions models/cont_delay_synapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
*/

#include "cont_delay_synapse.h"
#include "cont_delay_synapse_impl.h"

// Includes from nestkernel:
#include "nest_impl.h"

void
nest::register_cont_delay_synapse( const std::string& name )
Expand Down
68 changes: 68 additions & 0 deletions models/cont_delay_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,74 @@ cont_delay_synapse< targetidentifierT >::send( Event& e, size_t t, const CommonS
template < typename targetidentifierT >
constexpr ConnectionModelProperties cont_delay_synapse< targetidentifierT >::properties;

template < typename targetidentifierT >
cont_delay_synapse< targetidentifierT >::cont_delay_synapse()
: ConnectionBase()
, weight_( 1.0 )
, delay_offset_( 0.0 )
{
}

template < typename targetidentifierT >
void
cont_delay_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const
{
ConnectionBase::get_status( d );

def< double >( d, names::weight, weight_ );
def< double >( d, names::delay, Time( Time::step( get_delay_steps() ) ).get_ms() - delay_offset_ );
def< long >( d, names::size_of, sizeof( *this ) );
}

template < typename targetidentifierT >
void
cont_delay_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
{
ConnectionBase::set_status( d, cm );

updateValue< double >( d, names::weight, weight_ );

// set delay if mentioned
double delay;

if ( updateValue< double >( d, names::delay, delay ) )
{

const double h = Time::get_resolution().get_ms();

double int_delay;
const double frac_delay = std::modf( delay / h, &int_delay );

if ( frac_delay == 0 )
{
kernel().connection_manager.get_delay_checker().assert_valid_delay_ms( delay );
set_delay_steps( Time::delay_ms_to_steps( delay ) );
delay_offset_ = 0.0;
}
else
{
const long lowerbound = static_cast< long >( int_delay );
kernel().connection_manager.get_delay_checker().assert_two_valid_delays_steps( lowerbound, lowerbound + 1 );
set_delay_steps( lowerbound + 1 );
delay_offset_ = h * ( 1.0 - frac_delay );
}
}
}

template < typename targetidentifierT >
void
cont_delay_synapse< targetidentifierT >::check_synapse_params( const DictionaryDatum& syn_spec ) const
{
if ( syn_spec->known( names::delay ) )
{
LOG( M_WARNING,
"Connect",
"The delay will be rounded to the next multiple of the time step. "
"To use a more precise time delay it needs to be defined within "
"the synapse, e.g. with CopyModel()." );
}
}

} // of namespace nest

#endif // of #ifndef CONT_DELAY_SYNAPSE_H
Loading
Loading