Skip to content

Commit

Permalink
Fix templates
Browse files Browse the repository at this point in the history
  • Loading branch information
pnbabu committed Jan 9, 2024
1 parent e386bce commit 2497fc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ along with NEST. If not, see <http://www.gnu.org/licenses/>.
#include "connection.h"
#include "connector_model.h"
#include "event.h"
#include "nest_impl.h"
{%- if norm_rng %}

// Includes for random number generator
Expand Down Expand Up @@ -221,12 +220,6 @@ public:
{%- endif %}
};

void
register_{{ synapseName }}( const std::string& name )
{
nest::register_connection_model< {{ synapseName }} >( name );
}

template < typename targetidentifierT >
class {{synapseName}} : public Connection< targetidentifierT >
{
Expand Down Expand Up @@ -662,10 +655,10 @@ public:
}

{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2") or nest_version.startswith("v3.3") or nest_version.startswith("v3.4")) %}
void
bool
send( Event& e, const size_t tid, const {{synapseName}}CommonSynapseProperties& cp )
{%- else %}
void
bool
send( Event& e, const thread tid, const {{synapseName}}CommonSynapseProperties& cp )
{%- endif %}
{
Expand Down Expand Up @@ -853,6 +846,7 @@ public:
**/

t_lastspike_ = __t_spike;
return true;
}

void get_status( DictionaryDatum& d ) const;
Expand All @@ -868,6 +862,12 @@ public:
{%- endif %}
};

void
register_{{ synapseName }}( const std::string& name )
{
nest::register_connection_model< {{ synapseName }} >( name );
}

{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2") or nest_version.startswith("v3.3") or nest_version.startswith("v3.4")) %}
template < typename targetidentifierT >
constexpr ConnectionModelProperties {{synapseName}}< targetidentifierT >::properties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void

// register synapses
{%- for synapse in synapses %}
register_{{synapse.get_name()}}( "{{synapse.get_name()}}" );
nest::register_{{synapse.get_name()}}( "{{synapse.get_name()}}" );
{%- endfor %}
{%- endif %}
} // {{moduleName}}::init()

0 comments on commit 2497fc7

Please sign in to comment.