view libgomp/testsuite/libgomp.c++/single-3.C @ 0:a06113de4d67

first commit
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 14:47:48 +0900
parents
children
line wrap: on
line source

extern "C" void abort (void);

void
single (int a, int b)
{
  #pragma omp single copyprivate(a) copyprivate(b)
    {
      a = b = 5;
    }

  if (a != b)
    abort ();
}

int main()
{
  #pragma omp parallel
    single (1, 2);

  return 0;
}