IF Statements in Loops
Solution is to unroll the loop
Move conditional elements into scalars
Test scalars at the end of the loop body
do I = 1, n, 2
a = t(I)
b = t(I+1)
if (a .eq. 0.0)
end if
if (b .eq. 0.0)
end if
end do
Previous slide
Next slide
Back to first slide
View graphic version