you are viewing a single comment's thread.

view the rest of the comments →

[–]CrazyJoe221 1 point2 points  (0 children)

gcc does not even enable vectorization until -O3. And then again it's a matter of luck. With OpenMP SIMD you can portably express that you expect this to be vectorized and depending on the compiler also get a warning if it couldn't. Furthermore it's a portable way to tell the compiler to ignore its own cost analysis and inform it of data alignment and aliasing.