#define N 1024
#pragma acc kernels if(0 > 1)
{
for(int i = 0; i < N; i++)
{
C[i] = A[i] + B[i];
}
}
It’s obvious that the condition is not satisfied, whereas it is still accelerated by gpu. I wonder why? Because according to the book page 398, it should be executed on cpus.
No matter the condition is true or false, the code block is yet accelerated by gpu, which should not be.