Relative Content

Tag Archive for ccudaopenacc

OpenACC : how to use if condition?

#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 […]