Home > Archive > Fortran > July 2004 > Re: First Fortran program vectorized with experimental version of GNU Fortran.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: First Fortran program vectorized with experimental version of GNU Fortran.
|
|
| Richard Maine 2004-07-12, 8:58 pm |
| glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
> Toon Moene wrote:
....[color=darkred]
[color=darkred]
> the LOG should be moved out of any loop, in any case,
Questionable. If the product x*y overflows, then
evaluating this as log(x*y) would seem unwise...
or is that not what you mean by "moving the LOG out of the loop"?
Perhaps I misinterpret because that isn't really "out of the loop"
either.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
| |
| Richard Maine 2004-07-12, 8:58 pm |
| Toon Moene <toon@moene.indiv.nluug.nl> writes:
> No, there are three loop (nests) here:
[ note all are rank 1 arrays]
>
> A = LOG(X)
> B = LOG(Y)
> C = A + B
>
> LOG X can be hoisted out of the first loop (nest), LOG(Y) out of the second.
>
> Hmmmm, they're not "nests" because the arrays are rank-one.
Maybe I just don't understand compiler-writer terminology, but this
makes no sense to me. How do you hoist a LOG(X) out of the loop, even
conceptually? There are size(X) logs to do one way or another, which
sounds like a loop to me - or some equivalent parallel construct. I
suppose you could separate this from the assignment, in essense doing
a=x;a=log(a) but then the log is still in a loop - just a different
one.
There is possible loop fusion here, but I wouldn't have called that
"hoisting the log out of the loop" so I'm guessing that's not
what you mean. Of course, my guess could be wrong.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
| |
| James Van Buskirk 2004-07-12, 8:58 pm |
| "Richard Maine" <nospam@see.signature> wrote in message
news:m14qoclv09.fsf@macfortran.local...
> There are size(X) logs to do one way or another
Is size(X) defined for the scalar variable X?
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
| |
| Richard Maine 2004-07-12, 8:58 pm |
| "James Van Buskirk" <not_valid@comcast.net> writes:
> "Richard Maine" <nospam@see.signature> wrote in message
> news:m14qoclv09.fsf@macfortran.local...
>
>
> Is size(X) defined for the scalar variable X?
Oh.... Hit me. (Safe to say remotely. :-).
I completely missed the fact that X was scalar. That explains
all. Ignore my previous idiocy (and interpret that as broadly
as you feel appropriate; I already know how one will interpret
it, though I half suspect he will volunteer the information
just to make sure. :-))
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
|
|
|
|
|