llvm / llvm/llvm-project

[Flang][OpenMP] Add support for declare reduction without an initializer

Open
#196,209 0 comments 0 reactions 1 assignee Claimed by @sshrestha-aa View on GitHub
flang
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```
program main
implicit none
integer :: i, n, result
integer, allocatable :: array(:)
!$omp declare reduction(add_points : integer: omp_out = omp_out + omp_in)

n = 100
allocate(array(n))
do i=1, n
array(i) = i
end do

result = 0
!$omp parallel do reduction(add_points : result )
do i = 1, 100
result = result + i
end do

print *, result
end program main
```

ClauseProcessor.cpp:611: not yet implemented: declare reduction without an initializer clause is not yet supported
LLVM ERROR: aborting

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.