3 ms·
In HPC, we use `#pragma omp simd`. `#pragma omp imd` should force the vectorization, but maybe not the hoisting, I don't know. Could be nice to check. Edit:
by TApplencourt 7y ago
In HPC, we use `#pragma omp simd`.
`#pragma omp imd` should force the vectorization, but maybe not the hoisting, I don't know. Could be nice to check.
Edit:
Clang fail:
```
<source>:5:5: warning: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]
#pragma omp simd
^
1 warning generated.
Compiler returned: 0
```
But ICC seems happy with it.
- gpderetta 7y agoit works on my test: https://godbolt.org/z/sSSdjw where ivdep fails. Nice! You do need -fopenmp of course. edit: strangely, it still fails to vectorize the original vector example.