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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c/] [icv-1.c] - Blame information for rev 856

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

Line No. Rev Author Line
1 273 jeremybenn
#include <omp.h>
2
#include <stdlib.h>
3
 
4
int
5
main (void)
6
{
7
  int err = 0;
8
 
9
  omp_set_num_threads (4);
10
  if (omp_get_max_threads () != 4)
11
    abort ();
12
  #pragma omp parallel reduction(|: err) num_threads(1)
13
  {
14
    if (omp_get_max_threads () != 4)
15
      err |= 1;
16
    omp_set_num_threads (6);
17
    #pragma omp task if(0) shared(err)
18
    {
19
      if (omp_get_max_threads () != 6)
20
        err |= 2;
21
      omp_set_num_threads (5);
22
      if (omp_get_max_threads () != 5)
23
        err |= 4;
24
    }
25
    if (omp_get_max_threads () != 6)
26
      err |= 8;
27
  }
28
  if (err)
29
    abort ();
30
  if (omp_get_max_threads () != 4)
31
    abort ();
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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