mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-23 10:31:22 +00:00
27 lines
292 B
C
27 lines
292 B
C
extern "C" void abort (void);
|
|
int a;
|
|
|
|
void
|
|
foo ()
|
|
{
|
|
int i;
|
|
a = 30;
|
|
#pragma omp barrier
|
|
#pragma omp for lastprivate (a)
|
|
for (i = 0; i < 1024; i++)
|
|
{
|
|
a = i;
|
|
}
|
|
if (a != 1023)
|
|
abort ();
|
|
}
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
#pragma omp parallel num_threads (64)
|
|
foo ();
|
|
|
|
return 0;
|
|
}
|