Skip to content

SCA within ELEMENTAL function subroutine

Valentin Clement (バレンタイン クレメン) edited this page Oct 22, 2018 · 6 revisions

ELEMENTAL functions or subroutines have to be handled specifically within CLAW SCA transformation as the actual arguments of such function/subroutine is not known before the call is made on the calling translation unit.

The actual arguments in a reference to an elemental procedure can be either of the following: All scalar. For elemental functions, if the arguments are all scalar, the result is scalar. One or more array-valued. The following rules apply if one or more of the arguments is array-valued: For elemental functions, the shape of the result is the same as the shape of the array actual argument with the greatest rank. If more than one argument appears then all actual arguments must be conformable. For elemental subroutines, all actual arguments associated with INTENT(OUT) and INTENT(INOUT) dummy arguments must be arrays of the same shape, and the remaining actual arguments must be conformable with them.

Clone this wiki locally