| 1 |
{# USES_VARIABLES { N } #} |
| 2 |
{% extends 'common_group.pyx' %} |
| 3 |
|
| 4 |
{% block maincode %} |
| 5 |
{% set _target_var_array = get_array_name(_target_var) %} |
| 6 |
{% set _index_array = get_array_name(_index_var) %} |
| 7 |
cdef int _target_idx |
| 8 |
|
| 9 |
# Set all the target variable values to zero |
| 10 |
for _target_idx in range({{_target_size_name}}): |
| 11 |
{{_target_var_array}}[_target_idx + {{_target_start}}] = 0 |
| 12 |
|
| 13 |
# scalar code |
| 14 |
_vectorisation_idx = 1 |
| 15 |
{{scalar_code|autoindent}} |
| 16 |
|
| 17 |
for _idx in range({{N}}): |
| 18 |
# vector_code |
| 19 |
vectorisation_idx = _idx |
| 20 |
{{ vector_code | autoindent }} |
| 21 |
{{_target_var_array}}[{{_index_array}}[_idx]] += _synaptic_var |
| 22 |
|
| 23 |
{% endblock %} |