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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c/] [collapse-1.c] - Blame information for rev 280

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

Line No. Rev Author Line
1 273 jeremybenn
/* { dg-do run } */
2
 
3
#include <string.h>
4
#include <stdlib.h>
5
 
6
int
7
main (void)
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
  return 0;
30
}

powered by: WebSVN 2.1.0

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