mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-03 10:49:58 +00:00
32 lines
329 B
C
32 lines
329 B
C
/* { dg-do run { target openacc_nvidia_accel_selected } } */
|
|
|
|
#include <stdlib.h>
|
|
|
|
template<class T>
|
|
T foo()
|
|
{
|
|
T a, b;
|
|
#pragma acc declare create (a)
|
|
|
|
#pragma acc parallel copyout (b)
|
|
{
|
|
a = 5;
|
|
b = a;
|
|
}
|
|
|
|
return b;
|
|
}
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
int rc;
|
|
|
|
rc = foo<int>();
|
|
|
|
if (rc != 5)
|
|
abort ();
|
|
|
|
return 0;
|
|
}
|