Fortran 90 WHERE
Arguably the most evil primitive in F90
Results in a conditional in the innermost loop. What use is your pipeline?
2 options
- Instead of a boolean mask, multiply by a floating point array of 1.0 or 0.0. No branches!
- Code the loop by hand and unroll. Separate loads of the mask value and conditionals.