| 1 |
{# USES_VARIABLES { N } #} |
| 2 |
{# ALLOWS_SCALAR_WRITE #} |
| 3 |
{% extends 'common_group.cpp' %} |
| 4 |
|
| 5 |
{% block maincode %} |
| 6 |
//// MAIN CODE //////////// |
| 7 |
// scalar code |
| 8 |
const size_t _vectorisation_idx = -1; |
| 9 |
{{scalar_code|autoindent}} |
| 10 |
|
| 11 |
{# N is a constant in most cases (NeuronGroup, etc.), but a scalar array for |
| 12 |
synapses, we therefore have to take care to get its value in the right |
| 13 |
way. #} |
| 14 |
const int _N = {{constant_or_scalar('N', variables['N'])}}; |
| 15 |
{{openmp_pragma('parallel-static')}} |
| 16 |
for(int _idx=0; _idx<_N; _idx++) |
| 17 |
{ |
| 18 |
// vector code |
| 19 |
const size_t _vectorisation_idx = _idx; |
| 20 |
{{vector_code|autoindent}} |
| 21 |
} |
| 22 |
{% endblock %} |