Re: forall and do loop
- From: *** Hendrickson <***.hendrickson@xxxxxxx>
- Date: Fri, 27 Jul 2007 21:47:29 GMT
Gary Scott wrote:
*** Hendrickson wrote:Probably not to both questions. My personal guess is that nothing of
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.
So is it a target for obsolescence or will it become more useful in the future?
any scope or significance will become obsolescent in the future. I
think the "let's delete stuff and it'll go away" experiment is over.
It's also not likely to be improved. The F2008 DO CONCURRENT and
co-arrays are likely to be a much better solution for the class of
machines that currently exist (or will soon). FORALL was ultimately
tied to a class of parallel processors that never caught on; at least
that's what I remember.
*** Hendrickson
.
- References:
- forall and do loop
- From: aeroguy
- Re: forall and do loop
- From: glen herrmannsfeldt
- Re: forall and do loop
- From: aeroguy
- Re: forall and do loop
- From: *** Hendrickson
- Re: forall and do loop
- From: Gary Scott
- forall and do loop
- Prev by Date: Converting code from single to double precision
- Next by Date: Re: forall and do loop
- Previous by thread: Re: forall and do loop
- Next by thread: Re: forall and do loop
- Index(es):