2022-11-04 09:35:42 -07:00

16 lines
276 B
C

/*
* @@name: ploop.1
* @@type: C
* @@operation: compile
* @@expect: success
* @@version: pre_omp_3.0
*/
void simple(int n, float *a, float *b)
{
int i;
#pragma omp parallel for
for (i=1; i<n; i++) /* i is private by default */
b[i] = (a[i] + a[i-1]) / 2.0;
}