llvm / llvm/llvm-project

[FLANG][OpenMP] Support for Custom Reduction

Open
#164,650 6 comments 0 reactions 3 assignees Claimed by @Meinersbur View on GitHub
flang:openmp
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.