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-2.C] - Rev 307

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

#include <omp.h>

/* Orphaned work sharing.  */

extern "C" void abort (void);

#define N 10

void parloop (int *a)
{
  int i;

#pragma omp for
  for (i = 0; i < N; i++)
    a[i] = i + 3;
}

main()
{
  int i, a[N];

#pragma omp parallel shared(a)
  {
    parloop (a);
  }

  for (i = 0; i < N; i++)
    if (a[i] != i + 3)
      abort ();

  return 0;
}

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

powered by: WebSVN 2.1.0

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