[Dwarf-discuss] F9x elemental procedures
Ron 603-884-2088
brender
Wed Jun 8 09:01:48 GMT 2005
I believe Dave has more or less the right idea about the meaning of
ELEMENTAL procedures.
If there is more than one array argument, I think the arrays must
have a common shape so that there is only a single iteration involved,
not a cross product. My Fortran manual includes this example, which
I quote:
MIN(A, 0, B) ! A and B are arrays of shape (S, T)
In this case the elemental reference to the MIN intrinsic
function is an array expression whose elements have the
following values:
MIN(A(I,J), 0, B(I,J)), I=1,2,...,S, J=1,2,...,T
Note that ELEMENTAL procedures are a special case of PURE
procedures, so if we add/support an DW_AT_elemental attribute
(which I think is a good idea) then I suggest we ought to add
DW_AT_pure as well. In which case we might as well add
DW_AT_recursive to be complete. All three are optional prefixes
on ENTRY and procedure (SUBROUTINE or FUNCTION) statements.
DW_AT_pure and DW_AT_recursive do not involve any additional
support in a debugger beyond just being able to provide a
more complete/accurate reflection of the original source.
FWIW, I think the elemental concept was introduced in Fortran 95
and is not in Fortran 90.
Ron
More information about the Dwarf-discuss
mailing list