URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 816 |
Rev 826 |
! { dg-do run }
|
! { dg-do run }
|
|
|
program tasktest
|
program tasktest
|
use omp_lib
|
use omp_lib
|
integer :: i, j
|
integer :: i, j
|
common /tasktest_j/ j
|
common /tasktest_j/ j
|
j = 0
|
j = 0
|
!$omp parallel private (i)
|
!$omp parallel private (i)
|
i = omp_get_thread_num ()
|
i = omp_get_thread_num ()
|
if (i.lt.2) then
|
if (i.lt.2) then
|
!$omp task if (.false.) default(firstprivate)
|
!$omp task if (.false.) default(firstprivate)
|
call subr (i + 1)
|
call subr (i + 1)
|
!$omp end task
|
!$omp end task
|
end if
|
end if
|
!$omp end parallel
|
!$omp end parallel
|
if (j.gt.0) call abort
|
if (j.gt.0) call abort
|
contains
|
contains
|
subroutine subr (i)
|
subroutine subr (i)
|
use omp_lib
|
use omp_lib
|
integer :: i, j
|
integer :: i, j
|
common /tasktest_j/ j
|
common /tasktest_j/ j
|
if (omp_get_thread_num ().ne.(i - 1)) then
|
if (omp_get_thread_num ().ne.(i - 1)) then
|
!$omp atomic
|
!$omp atomic
|
j = j + 1
|
j = j + 1
|
end if
|
end if
|
end subroutine subr
|
end subroutine subr
|
end program tasktest
|
end program tasktest
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.