Skip to content

[FLANG][OpenMP] Support for Custom Reduction #164650

@koparasy

Description

@koparasy

Is there a plan or a timeline on when we will have custom openmp reduction support on FLANG. The following fails with several errors:

module mymod
  type maxtype
    real :: val
  end type maxtype

!$omp declare reduction(mymax: maxtype : omp_out = getmax(omp_in,omp_out)) initializer(omp_priv=omp_orig)

contains
   function getmax(m1, m2)
      implicit none
!$omp declare target
      type(maxtype), intent(in) :: m1, m2
      type(maxtype) :: getmax

      if (m1%val > m2%val) then
        getmax%val = m1%val
      else
        getmax%val = m2%val
      endif
   end function getmax
end module mymod

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions