Re: forall and do loop



aeroguy wrote:
Thanks guys. Ok so i don't want to manually modify my code for any
optimization? But then there are these two ways to do so...which one
should be followed. Both are correct ? right? Then how should i
determine which one i should use.... why i should give the first
preference or the latter one?

Is there a staright answer without going into compilers?

Yes, the straight answer is "Never use a FORALL unless you are sure
you have a specific processor dependent need for it." It's not a
general looping concept. It was added to give some support for
some forms of multi-processors. Unfortunately, it has some "features"
that make it difficult for a compiler to optimize. Unless you have
a problem that maps well to multi-processors, DO loops will always
generate code that is at least as good as FORALL code for any useful
loop; they'll often do better.

*** Hendrickson

thanks for you time and responses


.


Quantcast