In order to make full advantage of vector computers it is necessary that the code is highly vectorizable. Below we shall give some advices of how to improve the vectorizability of a code without reducing the scalar performance.
do 100i = 1,n if (var > 0) then a(i) = 0d0 else a(i) = b(i) endif 100 continueshould be replaced by:
if (var > 0) then do 100i = 1,n a(i) = 0d0 100 continue else do 110i = 1,n a(i) = b(i) 110 continue endif