Hello,
I know I can hybrid MIC and CPU by using synchronized offload directive.
But I have one question. How to do that without copying and paste codes
For example, there is a vector addition
#pragma omp prallel for for(i=0;i<N;i++) C[i] = A[i] + B[i];
I can hybrid it like:
#pragma offload inout(C[0:N/2]: alloc(C[0:N/2])) signal(&sig) { #pragma omp parallel for for(i=0;i<N/2;i++) C[i] = A[i] + B[i]; } #pragma omp parallel for for(i=N/2;i<N;i++) C[i] = A[i] + B[i]; #pragma offload wait(&sig)
But, is there a way that I don't need to copy-and-paste the code ?