Using pragma inside define
Using pragma inside define
/*
This doesn't work
*/
#ifdef OPENACC
#pragma acc kernels
#endif
/*
This works
*/
#ifdef OPENMP
_Pragma("omp parallel for")
#endif
for (int i = 0; i < N; i++) {
}
/*
This doesn't work
*/
#ifdef OPENACC
#pragma acc kernels
#endif
/*
This works
*/
#ifdef OPENMP
_Pragma("omp parallel for")
#endif
for (int i = 0; i < N; i++) {
}