Re: forall and do loop
- From: highegg <highegg@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 05:00:30 -0000
On Jul 31, 1:41 am, glen herrmannsfeldt <g...@xxxxxxxxxxxxxxxx> wrote:
Richard Maine wrote:
glen herrmannsfeldt <g...@xxxxxxxxxxxxxxxx> wrote:
If I designed FORALL I would have allowed intermixing of evaluationThat amounts to restricting it to the cases trivial enough that most
and assignment in any order, and left it to the programmer to be sure
that would work.
compilers probably don't generate temporaries today anyway. So you'd get
the same effect as today on that subset of cases, and you'd just say
that the other cases were illegal. Anyway, that's how I'd translate the
above.
That is pretty close to what I meant. I think there are some cases
of indirect loads that the compiler wouldn't catch, though.
FORALL (I=1:N) X(I)=X(L(I))
the programmer might know that no X() from the right side are
modified, but the compiler likely wouldn't. (That all L() were
greater than N.)
What about introducing an "unaliased assignment" (say, := or sth),
that would allow the programmer to guarantee that the left-hand side
is completely independent of right-and side? In case of forall, that
would of course apply to the whole sets of lhs's and rhs's.
Easily understandable and has the same effect, hasn't it?
.
- 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
- Re: forall and do loop
- From: highegg
- Re: forall and do loop
- From: glen herrmannsfeldt
- Re: forall and do loop
- From: Richard Maine
- Re: forall and do loop
- From: glen herrmannsfeldt
- forall and do loop
- Prev by Date: Re: Clear Screen
- Next by Date: Re: Clear Screen
- Previous by thread: Re: forall and do loop
- Next by thread: Re: forall and do loop
- Index(es):