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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c++/] [collapse-1.C] - Blame information for rev 791

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 735 jeremybenn
// { dg-do run }
2
 
3
#include 
4
#include 
5
 
6
int
7
main ()
8
{
9
  int i, j, k, l = 0;
10
  int a[3][3][3];
11
 
12
  memset (a, '\0', sizeof (a));
13
  #pragma omp parallel for collapse(4 - 1) schedule(static, 4)
14
    for (i = 0; i < 2; i++)
15
      for (j = 0; j < 2; j++)
16
        for (k = 0; k < 2; k++)
17
          a[i][j][k] = i + j * 4 + k * 16;
18
  #pragma omp parallel
19
    {
20
      #pragma omp for collapse(2) reduction(|:l) private (k)
21
        for (i = 0; i < 2; i++)
22
          for (j = 0; j < 2; j++)
23
            for (k = 0; k < 2; k++)
24
              if (a[i][j][k] != i + j * 4 + k * 16)
25
                l = 1;
26
    }
27
  if (l)
28
    abort ();
29
}

powered by: WebSVN 2.1.0

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