Subject: Re: Forall

From: [email-masked] (Min-You Wu)
Date: Thu, 25 Jun 92 10:25:49 EDT

> 
> Straw poll for the group:
> 
> 1. Should HPF define a scalar WHERE statement (with semantics as in Guy
> Steele's proposal) in a FORALL...
> 	A) If we cannot agree on a semantics for IF?
> 	B) If we do agree on a semantics for IF that is different
> 	   from WHERE semantics?
> 	C) If we agree to use WHERE semantics for IF?
> 
> (My votes are A - yes, B - yes, C - no.  I don't think we'll agree to
> C, though...)
> 
> 2. Which of the following statements should be allowed in a block FORALL?
> 	(Let's assume that assignment makes the cut :-)
> 	A) single-statement FORALL
> 	B) block FORALL
> 	C) array WHERE (i.e. current Fortran 90 WHERE)
> 	D) scalar WHERE (i.e. Marc's proposal)
> 	E) IF-THEN-ELSE with FORALL-invariant conditions
> 	F) IF-THEN-ELSE, conditions can depend on FORALL indices
> 	G) DO loop with FORALL-invariant bounds
> 	H) DO loop, bounds can depend on FORALL indices
> 	J) GOTO
> 	K) STOP and PAUSE
> 	L) I/O statements (OPEN, CLOSE, READ, WRITE, ...)
> 	M) ALLOCATE and DEALLOCATE
> 	N) CALL
> 
> (
> My reading of the current proposals is:
> 	Snir - all of above except F and H
> 	Page - A for sure; maybe B, C, and D
> 	Me - A, B, C, D for sure; E and F if we can agree on some meaning
> )
> 
> 	Chuck
> 

I suggest you distinguish "array CALL" and "scalar CALL".  That is:
 
      FORALL(I=1:N)
        A(I) = B(I) - 1
        CALL FOO(A)
      ENDFORALL

or

      FORALL(I=1:N)
        A(I) = B(I) - 1
        CALL FOO(A(I))
      ENDFORALL

Min-You