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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 735 jeremybenn
#include <omp.h>
2
#include <stdlib.h>
3
 
4
int
5
main (void)
6
{
7
  int i = -1, j = -1;
8
 
9
  omp_set_nested (0);
10
  omp_set_dynamic (0);
11
#pragma omp parallel num_threads (4)
12
  {
13
#pragma omp single
14
    {
15
      i = omp_get_thread_num () + omp_get_num_threads () * 256;
16
#pragma omp parallel num_threads (2)
17
      {
18
#pragma omp single
19
        {
20
          j = omp_get_thread_num () + omp_get_num_threads () * 256;
21
        }
22
      }
23
    }
24
  }
25
  if (i < 4 * 256 || i >= 4 * 256 + 4)
26
    abort ();
27
  if (j != 256 + 0)
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.