summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/appendix-a/a.8.1.c
blob: eed21b367ccd722f07c06b8ca08145e87dc2e1ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */

#include <math.h>
void
a8 (int n, int m, float *a, float *b, float *y, float *z)
{
  int i;
#pragma omp parallel
  {
#pragma omp for nowait
    for (i = 1; i < n; i++)
      b[i] = (a[i] + a[i - 1]) / 2.0;
#pragma omp for nowait
    for (i = 0; i < m; i++)
      y[i] = sqrt (z[i]);
  }
}