mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-04 01:50:38 +00:00
24 lines
257 B
C
24 lines
257 B
C
|
extern void abort (void);
|
||
|
|
||
|
#pragma omp declare target
|
||
|
int
|
||
|
foo (void)
|
||
|
{
|
||
|
static int s;
|
||
|
return ++s;
|
||
|
}
|
||
|
#pragma omp end declare target
|
||
|
|
||
|
int
|
||
|
main ()
|
||
|
{
|
||
|
int r;
|
||
|
#pragma omp target map(from:r)
|
||
|
{
|
||
|
r = foo ();
|
||
|
}
|
||
|
if (r != 1)
|
||
|
abort ();
|
||
|
return 0;
|
||
|
}
|