Commit 31e63cd2 authored by Budiardja, Reuben's avatar Budiardja, Reuben
Browse files

Simple case for dynamic user conditon selector.

parent c4ebc929
program OpenMP_metadirective_dynamic
use omp_lib
implicit none
logical :: &
ID
integer :: &
nSizes
nSizes = 1025
!$OMP begin metadirective &
!$OMP when ( user = { condition ( nSizes > 1024 ) } &
!$OMP : target map ( tofrom: ID ) )
ID = omp_is_initial_device ( )
!$OMP end metadirective
if ( ID ) then
print*, 'Program runs on host'
else
print*, 'Program runs on device'
end if
end program OpenMP_metadirective_dynamic
Supports Markdown
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