| 1 |
{# Note that we don't write to scalar variables conditionally. The scalar code |
| 2 |
should therefore only include the calculation of scalar expressions |
| 3 |
that are used below for writing to a vector variable #} |
| 4 |
{% extends 'common_group.py_' %} |
| 5 |
|
| 6 |
{% block maincode %} |
| 7 |
# scalar code |
| 8 |
_vectorisation_idx = 1 |
| 9 |
{{scalar_code|autoindent}} |
| 10 |
|
| 11 |
{# Get the name of the array that stores these events (e.g. the spikespace array) #} |
| 12 |
{% set _eventspace = get_array_name(eventspace_variable) %} |
| 13 |
|
| 14 |
# vector code |
| 15 |
_idx = {{_eventspace}}[:{{_eventspace}}[-1]] |
| 16 |
_vectorisation_idx = _idx |
| 17 |
{{vector_code|autoindent}} |
| 18 |
{% endblock %} |