OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [appendix-a/] [a.31.2.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
 
3
void
4
a31_2 (float *x, int *y, int n)
5
{
6
  int i, b, b_p;
7
  float a, a_p;
8
  a = 0.0;
9
  b = 0;
10
#pragma omp parallel shared(a, b, x, y, n) \
11
                     private(a_p, b_p)
12
  {
13
    a_p = 0.0;
14
    b_p = 0;
15
#pragma omp for private(i)
16
    for (i = 0; i < n; i++)
17
      {
18
        a_p += x[i];
19
        b_p ^= y[i];
20
      }
21
#pragma omp critical
22
    {
23
      a += a_p;
24
      b ^= b_p;
25
    }
26
  }
27
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.