mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-01 11:52:47 +00:00
25 lines
445 B
C
25 lines
445 B
C
extern void abort (void);
|
|
|
|
#pragma omp declare target
|
|
int v = 6;
|
|
#pragma omp end declare target
|
|
|
|
int
|
|
main ()
|
|
{
|
|
#pragma omp target /* predetermined map(tofrom: v) */
|
|
v++;
|
|
#pragma omp target update from (v)
|
|
if (v != 7)
|
|
abort ();
|
|
#pragma omp parallel private (v) num_threads (1)
|
|
{
|
|
#pragma omp target /* predetermined firstprivate(v) */
|
|
v++;
|
|
}
|
|
#pragma omp target update from (v)
|
|
if (v != 7)
|
|
abort ();
|
|
return 0;
|
|
}
|