OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [libgomp/] [testsuite/] [libgomp.c++/] [loop-4.C] - Diff between revs 38 and 154

Only display areas with differences | Details | Blame | View Log

Rev 38 Rev 154
extern "C" void abort (void);
extern "C" void abort (void);
main()
main()
{
{
  int i, a;
  int i, a;
  a = 30;
  a = 30;
#pragma omp parallel for firstprivate (a) lastprivate (a) \
#pragma omp parallel for firstprivate (a) lastprivate (a) \
        num_threads (2) schedule(static)
        num_threads (2) schedule(static)
  for (i = 0; i < 10; i++)
  for (i = 0; i < 10; i++)
    a = a + i;
    a = a + i;
  /* The thread that owns the last iteration will have computed
  /* The thread that owns the last iteration will have computed
     30 + 5 + 6 + 7 + 8 + 9 = 65.  */
     30 + 5 + 6 + 7 + 8 + 9 = 65.  */
  if (a != 65)
  if (a != 65)
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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