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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c++/] [loop-4.C] - Blame information for rev 308

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

Line No. Rev Author Line
1 273 jeremybenn
extern "C" void abort (void);
2
 
3
main()
4
{
5
  int i, a;
6
 
7
  a = 30;
8
 
9
#pragma omp parallel for firstprivate (a) lastprivate (a) \
10
        num_threads (2) schedule(static)
11
  for (i = 0; i < 10; i++)
12
    a = a + i;
13
 
14
  /* The thread that owns the last iteration will have computed
15
     30 + 5 + 6 + 7 + 8 + 9 = 65.  */
16
  if (a != 65)
17
    abort ();
18
 
19
  return 0;
20
}

powered by: WebSVN 2.1.0

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