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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c++/] [loop-2.C] - Blame information for rev 859

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

Line No. Rev Author Line
1 273 jeremybenn
#include 
2
 
3
/* Orphaned work sharing.  */
4
 
5
extern "C" void abort (void);
6
 
7
#define N 10
8
 
9
void parloop (int *a)
10
{
11
  int i;
12
 
13
#pragma omp for
14
  for (i = 0; i < N; i++)
15
    a[i] = i + 3;
16
}
17
 
18
main()
19
{
20
  int i, a[N];
21
 
22
#pragma omp parallel shared(a)
23
  {
24
    parloop (a);
25
  }
26
 
27
  for (i = 0; i < N; i++)
28
    if (a[i] != i + 3)
29
      abort ();
30
 
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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