Re: forall and do loop
- From: highegg <highegg@xxxxxxxxx>
- Date: Mon, 30 Jul 2007 07:39:51 -0000
I think we're basically in agreement about everything here. It's
totally specified by the standard. It's just that the specification
doesn't allow as much optimization on today's kind of computers as
it did for computers being designed in the 80's. As a result,
I think it's generally a mistake to use FORALL unless you have some
good reason. Clarity of code is a good reason, so is [hardware
specific] optimization. The main (only?) "problem" with FORALL
is that people are surprised by the general need for temporaries
when storing.
But they shouldn't be. Everyone seems to accept compiler creating
necessary temporaries when evaluating scalar expressions, and the
whole array arithmetic stuff is build around the idea of treating
arrays quite like scalars.
And strangely enough, people seem to calmly accept Matlab or Octave
making temporaries for array arithmetics all the time, but for some
reason they expect a Fortran compiler to be so ultra-mega-intelligent
and reduce the temporaries to an absolute minimum (or even below
that). Why?
.
- Follow-Ups:
- Re: forall and do loop
- From: glen herrmannsfeldt
- Re: forall and do loop
- From: Richard Maine
- 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
- Re: forall and do loop
- From: highegg
- Re: forall and do loop
- From: *** Hendrickson
- Re: forall and do loop
- From: highegg
- Re: forall and do loop
- From: *** Hendrickson
- forall and do loop
- Prev by Date: Re: Problem linking fortran code
- Next by Date: Re: Problem linking fortran code
- Previous by thread: Re: forall and do loop
- Next by thread: Re: forall and do loop
- Index(es):