[flang-commits] [flang] [flang] Define CO_REDUCE intrinsic procedure (PR #125115)
Jean-Didier PAILLEUX via flang-commits
flang-commits at lists.llvm.org
Sun Feb 2 23:57:30 PST 2025
================
@@ -1450,6 +1450,17 @@ static const IntrinsicInterface intrinsicSubroutine[]{
{"errmsg", DefaultChar, Rank::scalar, Optionality::optional,
common::Intent::InOut}},
{}, Rank::elemental, IntrinsicClass::collectiveSubroutine},
+ {"co_reduce",
+ {{"a", AnyData, Rank::anyOrAssumedRank, Optionality::required,
+ common::Intent::InOut},
+ {"operation", SameType, Rank::reduceOperation},
----------------
JDPailleux wrote:
Yes `operation` is a function. `Operation` follows the same rules as the 'operation' argument of the 'reduce' intrinsic. He has 2 arguments, which must have the same type, and the same applies to the function's result, as well as other rules. To respect what was done for 'reduce', I've used the same rule as this intrinsic.
https://github.com/llvm/llvm-project/pull/125115
More information about the flang-commits
mailing list