Does long double is supported in pgcc 17.10-0 64-bit

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) {
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] = a

There is no problem with float and double, but long double.

Any suggestion?_

Same answer as your other post: SoA by reference

Sorry, no. GPUs don’t support 80-bit (or 128-bit) double precision floating point values so “long double” can’t be used in device code.

We could demote 80-bit to 64-bit as CUDA does, but this would give divergent answers between host and device code which is not ideal.



Thanks so much for your fast answer.