Re: forall and do loop
- From: Gary Scott <garylscott@xxxxxxxxxxxxx>
- Date: Fri, 27 Jul 2007 11:36:24 -0500
*** Hendrickson wrote:
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?
*** Hendrickson
thanks for you time and responses
--
Gary Scott
mailto:garylscott@sbcglobal dot net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
If you want to do the impossible, don't hire an expert because he knows it can't be done.
-- Henry Ford
.
- Follow-Ups:
- Re: forall and do loop
- From: *** Hendrickson
- Re: forall and do loop
- 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
- forall and do loop
- Prev by Date: Re: forall and do loop
- 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):