Mercurial > hg > CbC > CbC_gcc
view libgomp/testsuite/libgomp.oacc-c-c++-common/no_create-3.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
#include <float.h> /* For FLT_EPSILON. */ #include <math.h> /* For fabs. */ #include <stdlib.h> /* For abort. */ int main() { #define N 100 float b[N]; float c[N]; #pragma acc enter data create(b) #pragma acc parallel loop no_create(b) no_create(c) for (int i = 0; i < N; ++i) b[i] = i; #pragma acc exit data copyout(b) for (int i = 0; i < N; ++i) if (fabs (b[i] - i) > 10.0*FLT_EPSILON) abort (); return 0; }