Enable vectorization

The Dependencies analysis shows there is no real dependency in the loop for the given workload. Tell the compiler it is safe to vectorize using the restrict keyword or a directive:

DirectiveOutcome
#pragma omp simdIgnores all dependencies in the loop
#pragma ivdepIgnores only vector dependencies (which is safest)

Example

#pragma ivdep
...
#pragma ivdep
for (i = 0; i < n - 4; i += 4)
{
    // Here another line of comments for demontration of
    // easy to use code sample...
    a[i + 4] = a[i] * c;
}

Read More