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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c/] [collapse-2.c] - Blame information for rev 801

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 <stdlib.h>
4
#include <omp.h>
5
 
6
int
7
main (void)
8
{
9
  int i, j, k, l = 0, f = 0;
10
  int m1 = 4, m2 = -5, m3 = 17;
11
 
12
  #pragma omp parallel for num_threads (8) collapse(3) \
13
                       schedule(static, 9) reduction(+:l) \
14
                       firstprivate(f)
15
    for (i = -2; i < m1; i++)
16
      for (j = m2; j < -2; j++)
17
        {
18
          for (k = 13; k < m3; k++)
19
            {
20
              if (omp_get_num_threads () == 8
21
                  && ((i + 2) * 12 + (j + 5) * 4 + (k - 13)
22
                      != (omp_get_thread_num () * 9
23
                          + f++)))
24
                l++;
25
            }
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.