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