Hi There,
I am trying with long double datatype, however I got this messages when compile
Accelerator restriction: datatype not supported: x
I read a question similar with double.
The basic Code:
int main (int argc, char **argv)
{
int N = 1<<20; // 1 million long doubles
if (argc > 1)
N = atoi(argv[1]);
long double *x=( long double )malloc(Nsizeof( long double));
long double *d=( long double )malloc(Nsizeof( long double));
for (int i=0; i < N; ++i) {
x_=2.00;
d=1.00;
}
saxpy(N,3.00,x,d);
return 0;
}
void saxpy(int n, long double a, long double *restrict x, long double restrict y)
{
int k;
#pragma acc kernels
for (k=0; k<n; ++k)
x[k] = ay[k]+x[k];
}
There is no problem with float and double, but long double.
Any suggestion?_