1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
{# USES_VARIABLES { _queue } #}
{% extends 'common_group.py_' %}
{% block maincode %}
_spiking_synapses = _queue.peek()
if len(_spiking_synapses):
# scalar code
{# Note that we don't write to scalar variables conditionally. The scalar code
should therefore only include the calculation of scalar expressions
that are used below for writing to a vector variable #}
{{scalar_code|autoindent}}
# vector code
_idx = _spiking_synapses
_vectorisation_idx = _idx
{{vector_code|autoindent}}
# Advance the spike queue
_queue.advance()
{% endblock %}
|