mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-11 03:52:59 +00:00
28 lines
423 B
C
28 lines
423 B
C
|
/* { dg-do run } */
|
||
|
/* { dg-require-effective-target offload_device } */
|
||
|
|
||
|
#include <omp.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main ()
|
||
|
{
|
||
|
int res;
|
||
|
int default_device = omp_get_default_device ();
|
||
|
|
||
|
#pragma omp target
|
||
|
res = omp_is_initial_device ();
|
||
|
|
||
|
if (res)
|
||
|
abort ();
|
||
|
|
||
|
omp_set_default_device (omp_get_num_devices ());
|
||
|
|
||
|
#pragma omp target
|
||
|
res = omp_is_initial_device ();
|
||
|
|
||
|
if (!res)
|
||
|
abort ();
|
||
|
|
||
|
return 0;
|
||
|
}
|