[all-commits] [llvm/llvm-project] 3ada88: [flang][runtime] Runtime support for REDUCE() (#86...

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Mar 26 09:21:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ada883f7c96e099e1a665c091751bff5f16690e
      https://github.com/llvm/llvm-project/commit/3ada883f7c96e099e1a665c091751bff5f16690e
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
    A flang/include/flang/Runtime/reduce.h
    M flang/include/flang/Runtime/reduction.h
    M flang/lib/Semantics/check-call.cpp
    M flang/runtime/CMakeLists.txt
    M flang/runtime/complex-reduction.c
    M flang/runtime/complex-reduction.h
    M flang/runtime/io-api.cpp
    A flang/runtime/reduce.cpp
    M flang/runtime/reduction-templates.h
    M flang/runtime/tools.cpp
    M flang/runtime/tools.h
    M flang/unittests/Runtime/Reduction.cpp

  Log Message:
  -----------
  [flang][runtime] Runtime support for REDUCE() (#86214)

Supports the REDUCE() transformational intrinsic function of Fortran
(see F'2023 16.9.173) in a manner similar to the existing support for
SUM(), PRODUCT(), &c. There are APIs for total reductions to scalar
results, and APIs for partial reductions that reduce the rank of the
argument by one.

This implementation requires more functions than other reductions
because the various possible types of the user-supplied OPERATION=
function need to be elaborated.

Once the basic API in reduce.h has been approved, later patches will
implement lowering.

REDUCE() is primarily for completeness, not portability; only one other
Fortran compiler implements this F'2018 feature today, and only some
types work correctly with it.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list