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:
| Directive | Outcome |
|---|---|
| #pragma omp simd | Ignores all dependencies in the loop |
| #pragma ivdep | Ignores only vector dependencies (which is safest) |
#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;
}