OpenMP-Examples/sources/Example_SIMD.4c.c

15 lines
230 B
C

/*
* @@name: SIMD.4c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
*/
void work( float *b, int n, int m )
{
int i;
#pragma omp simd safelen(16)
for (i = m; i < n; i++)
b[i] = b[i-m] - 1.0f;
}