Re: forall and do loop



highegg wrote:

Use the one that appears more clear to you - easier to read and/or
write.

That appears to be the biggest advantage of forall when a mask condition is appropriate; it's clearer than the alternatives. I don't see any reason to use forall rather than array section (or whole array) assignments in the example given at the top of the thread. In such simple situations, any reasonable alternative ought to give the same performance.
I submit compiler problem reports when masked forall doesn't work as well as f77 syntax.
.



Relevant Pages

  • Re: forall and do loop
    ... why not tell the compiler that you know things can be done in ... The problem is that FORALL wasn't well enough specified to ... It also is a nice syntax to do array ... One probblem with HPF is that few real-life parallel computations can ...
    (comp.lang.fortran)
  • Re: Challanges of Implementing the ISO Standard...
    ... representatives from compiler companies. ... in the meal-break asked him about the problems of implementing FORALL. ... FORALLs can be replaced by using array constructors with implied-do ... temporaries when necessary to store intermediate results that might. ...
    (comp.lang.fortran)
  • Re: fast array assignement
    ... I tested this on a Mac with xlf -03, and (after removing the POINTER ... FORALL) all of the loops take the same amount of time except for the ... the array assignment takes about twice as long. ...
    (comp.lang.fortran)
  • Re: Fortran now in the Great Language Shootout
    ... > IMHO forall is nice in the sense that in the not too far future we ... But of course, any compiler ... > to see that an equivalent do-loop has no dependency either. ... That will require a temporary array to hold the first ...
    (comp.lang.fortran)
  • Re: FORALL Insert and setting values to specific item in associative array PLS-00431
    ... I'm having an issue using a FORALL and inserting data into a table, ... My array looks like this: ... for the PID column above and thought the array might give me a ... I can compile and run it if I use a_items) ...
    (comp.databases.oracle.misc)