I am writing a program in C (a 2d poisson solver) and I am using openMP to speed-up a big for loop. What I observed is that inside an openMP parallel block, the for loop is not vectorized even in the case where I include the #pragma always vector directive. For the compilation I am using the pathscale compiler.
The code I want to vectorize looks like this :
#pragma omp parallel shared(in, out, lambda,dim,C) private(k)
{
#pragma omp for schedule(guided,dim/nthreads) nowait
for(k = 0;k < dim; k++){
in[k] = C*out[k]*lambda[k];
}
}
where out,lambda and in are double precision arrays.
But even if I include #pragma always vector, what the compiler answers is :
warning: ignoring #pragma always vector
Do you know if there is any workaround for this?
Thanks.