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-8.c] - Blame information for rev 850

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

Line No. Rev Author Line
1 273 jeremybenn
extern void abort (void);
2
 
3
int buf[256];
4
 
5
void __attribute__((noinline))
6
foo (void)
7
{
8
  int i;
9
  #pragma omp for schedule (auto)
10
    for (i = 0; i < 256; i++)
11
      buf[i] += i;
12
}
13
 
14
int
15
main (void)
16
{
17
  int i;
18
  #pragma omp parallel for schedule (auto)
19
    for (i = 0; i < 256; i++)
20
      buf[i] = i;
21
  #pragma omp parallel num_threads (4)
22
    foo ();
23
  for (i = 0; i < 256; i++)
24
    if (buf[i] != 2 * i)
25
      abort ();
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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