Commit 7f42c5db authored by Budiardja, Reuben's avatar Budiardja, Reuben
Browse files

Test case for Begin/End metadirective with dynamic selector.

parent ca4edc29
program OpenMP_BeginEndMetadirectiveDynamic_TargetTeamsDistributeParallelDo
use omp_lib
implicit none
logical :: &
ID, &
UseDevice
integer :: &
iV
real, dimension ( : ), allocatable :: &
A, B, C
UseDevice = .true.
allocate ( A ( 1024 ), B ( 1024 ), C ( 1024 ) )
!$OMP begin metadirective &
!$OMP when ( user = { condition ( UseDevice .EQV. .true. ) } &
!$OMP : target teams distribute parallel do )
do iV = 1, size ( A )
C ( iV ) = A ( iV ) + B ( iV )
end do
!$OMP end metadirective
!-- FIXME: needs verification
end program OpenMP_BeginEndMetadirectiveDynamic_TargetTeamsDistributeParallelDo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment