mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-29 12:50:35 +00:00
20 lines
340 B
Fortran
20 lines
340 B
Fortran
! Test a simple acc loop reduction inside a kernels region.
|
|
|
|
! { dg-do run }
|
|
|
|
program reduction
|
|
integer, parameter :: n = 20
|
|
integer :: i, red
|
|
|
|
red = 0
|
|
|
|
!$acc kernels
|
|
!$acc loop reduction (+:red)
|
|
do i = 1, n
|
|
red = red + 1
|
|
end do
|
|
!$acc end kernels
|
|
|
|
if (red .ne. n) call abort
|
|
end program reduction
|