(j3.2006) contradiction in CO_REDUCE
Bill Long
longb
Thu Jan 16 18:48:46 EST 2014
On Jan 16, 2014, at 5:29 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:
> On Thu, 2014-01-16 at 22:16 +0000, John Reid wrote:
>
>> I can't remember what the reason is. If we require the procedure to be
>> elemental, there is nothing to stop a vendor calling it element by
>> element.
>
> I think the restriction had something to do with pre-judging whether
> iterating over the array elements happens inside or outside the
> elemental procedure.
>
That was my assumption - the discussion happened before I joined J3. In which case, it does matter how the dummy procedure is declared in CO_REDUCE since it affects how the procedure is called if the implementation uses the ?inside? alternative.
As a practical matter, the shape of SOURCE should be known inside CO_REDUCE, so it should be possible to make the call to OPERATOR correctly even if it is declared elemental. On the other hand, the performance of CO_REDUCE is going to be dominated by the communications activity for all but the most extreme examples of OPERATOR.
Is CO_REDUCE the only intrinsic that has a procedure dummy argument? If so, and we wanted to change the constraint, we could make it apply to only to calls to non-intrinisc procedures, which reads better than calling out one particular name.
Cheers,
Bill
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
Bill Long longb at cray.com
Fortran Technical Suport & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3
mailing list