Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 1 addition & 16 deletions build_support/generate_modelsmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,6 @@ def generate_modelsmodule():

// Generated includes
#include "config.h"

// Includes from nestkernel
#include "common_synapse_properties.h"
#include "connector_model_impl.h"
#include "genericmodel.h"
#include "genericmodel_impl.h"
#include "kernel_manager.h"
#include "model_manager_impl.h"
#include "target_identifier.h"
"""
)
)
Expand Down Expand Up @@ -296,18 +287,12 @@ def generate_modelsmodule():
)
)

conn_reg = ' register_connection_model< {model} >( "{model}" );\n'
node_reg = ' kernel().model_manager.register_node_model< {model} >( "{model}" );\n'

for model_type, guards_mnames in models.items():
file.write(f"\n // {model_type.capitalize()} models\n")
for guards, mnames in guards_mnames.items():
file.write(start_guard(guards))
for mname in mnames:
if model_type == "connection":
file.write(conn_reg.format(model=mname))
else:
file.write(node_reg.format(model=mname))
file.write(f' register_{mname}( "{mname}" );\n')
file.write(end_guard(guards))

file.write("}")
Expand Down
7 changes: 7 additions & 0 deletions models/ac_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
// Includes from nestkernel:
#include "event_delivery_manager_impl.h"
#include "kernel_manager.h"
#include "nest_impl.h"
#include "universal_data_logger_impl.h"

// Includes from sli:
Expand All @@ -41,6 +42,12 @@

namespace nest
{
void
register_ac_generator( const std::string& name )
{
register_node_model< ac_generator >( name );
}

RecordablesMap< ac_generator > ac_generator::recordablesMap_;

template <>
Expand Down
2 changes: 2 additions & 0 deletions models/ac_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ EndUserDocs */

namespace nest
{
void register_ac_generator( const std::string& name );

class ac_generator : public StimulationDevice
{

Expand Down
7 changes: 7 additions & 0 deletions models/aeif_cond_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +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"

Expand All @@ -51,6 +52,12 @@ nest::RecordablesMap< nest::aeif_cond_alpha > nest::aeif_cond_alpha::recordables

namespace nest // template specialization must be placed in namespace
{
void
register_aeif_cond_alpha( const std::string& name )
{
register_node_model< aeif_cond_alpha >( name );
}

// Override the create() method with one call to RecordablesMap::insert_()
// for each quantity to be recorded.
template <>
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_cond_alpha.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ Examples using this model

EndUserDocs */

void register_aeif_cond_alpha( const std::string& name );

class aeif_cond_alpha : public ArchivingNode
{

Expand Down
7 changes: 7 additions & 0 deletions models/aeif_cond_alpha_astro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +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"

Expand All @@ -51,6 +52,12 @@ nest::RecordablesMap< nest::aeif_cond_alpha_astro > nest::aeif_cond_alpha_astro:

namespace nest // template specialization must be placed in namespace
{
void
register_aeif_cond_alpha_astro( const std::string& name )
{
register_node_model< aeif_cond_alpha_astro >( name );
}

// Override the create() method with one call to RecordablesMap::insert_()
// for each quantity to be recorded.
template <>
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_cond_alpha_astro.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ iaf_cond_alpha, aeif_cond_exp, astrocyte_lr_1994, sic_connection

EndUserDocs */

void register_aeif_cond_alpha_astro( const std::string& name );

class aeif_cond_alpha_astro : public ArchivingNode
{

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

// Includes from sli:
Expand All @@ -43,6 +44,12 @@

namespace nest // template specialization must be placed in namespace
{
void
register_aeif_cond_alpha_multisynapse( const std::string& name )
{
register_node_model< aeif_cond_alpha_multisynapse >( name );
}


/* ----------------------------------------------------------------
* Recordables map
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_cond_alpha_multisynapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ namespace nest
*/
extern "C" int aeif_cond_alpha_multisynapse_dynamics( double, const double*, double*, void* );

void register_aeif_cond_alpha_multisynapse( const std::string& name );

class aeif_cond_alpha_multisynapse : public ArchivingNode
{

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

// Includes from sli:
Expand All @@ -43,6 +44,12 @@

namespace nest // template specialization must be placed in namespace
{
void
register_aeif_cond_beta_multisynapse( const std::string& name )
{
register_node_model< aeif_cond_beta_multisynapse >( name );
}


/* ----------------------------------------------------------------
* Recordables map
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_cond_beta_multisynapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ Examples using this model

EndUserDocs */

void register_aeif_cond_beta_multisynapse( const std::string& name );

class aeif_cond_beta_multisynapse : public ArchivingNode
{

Expand Down
7 changes: 7 additions & 0 deletions models/aeif_cond_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +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"

Expand All @@ -51,6 +52,12 @@ nest::RecordablesMap< nest::aeif_cond_exp > nest::aeif_cond_exp::recordablesMap_

namespace nest
{
void
register_aeif_cond_exp( const std::string& name )
{
register_node_model< aeif_cond_exp >( name );
}

/*
* template specialization must be placed in namespace
*
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_cond_exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ Examples using this model

EndUserDocs */

void register_aeif_cond_exp( const std::string& name );

class aeif_cond_exp : public ArchivingNode
{

Expand Down
7 changes: 7 additions & 0 deletions models/aeif_psc_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +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"

Expand All @@ -51,6 +52,12 @@ nest::RecordablesMap< nest::aeif_psc_alpha > nest::aeif_psc_alpha::recordablesMa

namespace nest // template specialization must be placed in namespace
{
void
register_aeif_psc_alpha( const std::string& name )
{
register_node_model< aeif_psc_alpha >( name );
}

// Override the create() method with one call to RecordablesMap::insert_()
// for each quantity to be recorded.
template <>
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_psc_alpha.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ Examples using this model

EndUserDocs */

void register_aeif_psc_alpha( const std::string& name );

class aeif_psc_alpha : public ArchivingNode
{

Expand Down
7 changes: 7 additions & 0 deletions models/aeif_psc_delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +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"

Expand All @@ -51,6 +52,12 @@ nest::RecordablesMap< nest::aeif_psc_delta > nest::aeif_psc_delta::recordablesMa

namespace nest
{
void
register_aeif_psc_delta( const std::string& name )
{
register_node_model< aeif_psc_delta >( name );
}

/*
* template specialization must be placed in namespace
*
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_psc_delta.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ Examples using this model

EndUserDocs */

void register_aeif_psc_delta( const std::string& name );

class aeif_psc_delta : public ArchivingNode
{

Expand Down
7 changes: 7 additions & 0 deletions models/aeif_psc_delta_clopath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +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"

Expand All @@ -51,6 +52,12 @@ nest::RecordablesMap< nest::aeif_psc_delta_clopath > nest::aeif_psc_delta_clopat

namespace nest
{
void
register_aeif_psc_delta_clopath( const std::string& name )
{
register_node_model< aeif_psc_delta_clopath >( name );
}

/*
* template specialization must be placed in namespace
*
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_psc_delta_clopath.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ Examples using this model

EndUserDocs */

void register_aeif_psc_delta_clopath( const std::string& name );

class aeif_psc_delta_clopath : public ClopathArchivingNode
{

Expand Down
7 changes: 7 additions & 0 deletions models/aeif_psc_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +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"

Expand All @@ -51,6 +52,12 @@ nest::RecordablesMap< nest::aeif_psc_exp > nest::aeif_psc_exp::recordablesMap_;

namespace nest
{
void
register_aeif_psc_exp( const std::string& name )
{
register_node_model< aeif_psc_exp >( name );
}

/*
* template specialization must be placed in namespace
*
Expand Down
2 changes: 2 additions & 0 deletions models/aeif_psc_exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ Examples using this model

EndUserDocs */

void register_aeif_psc_exp( const std::string& name );

class aeif_psc_exp : public ArchivingNode
{

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

// Includes from sli:
Expand All @@ -43,6 +44,12 @@ nest::RecordablesMap< nest::amat2_psc_exp > nest::amat2_psc_exp::recordablesMap_

namespace nest // template specialization must be placed in namespace
{
void
register_amat2_psc_exp( const std::string& name )
{
register_node_model< amat2_psc_exp >( name );
}

/*
* Override the create() method with one call to RecordablesMap::insert_()
* for each quantity to be recorded.
Expand Down
2 changes: 2 additions & 0 deletions models/amat2_psc_exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ SpikeEvent, CurrentEvent, DataLoggingRequest

EndUserDocs */

void register_amat2_psc_exp( const std::string& name );

class amat2_psc_exp : public ArchivingNode
{

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

// Includes from sli:
Expand All @@ -46,6 +47,12 @@ nest::RecordablesMap< nest::astrocyte_lr_1994 > nest::astrocyte_lr_1994::recorda

namespace nest
{
void
register_astrocyte_lr_1994( const std::string& name )
{
register_node_model< astrocyte_lr_1994 >( name );
}

// Override the create() method with one call to RecordablesMap::insert_()
// for each quantity to be recorded.
template <>
Expand Down Expand Up @@ -486,7 +493,7 @@ nest::astrocyte_lr_1994::update( Time const& origin, const long from, const long
}

/**
* Default implementation of register_stdp_connection() just
* Default implementation of register_stdp_connection( const std::string& name )
* throws IllegalConnection
*/
void
Expand Down
Loading