Commit 414a5857 authored by Budiardja, Reuben's avatar Budiardja, Reuben
Browse files

Tests for target atomic with metadirective.

parent 31e63cd2
program Atomic_Metadirective
use omp_lib
implicit none
real :: &
A
!$OMP metadirective &
!$OMP when ( implementation = { vendor (cray) } : atomic update )
A = A + 1
end program Atomic_Metadirective
program TargetAtomic_Metadirective
use omp_lib
implicit none
real :: &
A
!-- Conceptual test to use hint for atomic as needed
!$OMP target
!$OMP metadirective &
!$OMP when ( implementation = { vendor ("VVV") }, &
!$OMP device = { arch ( "gfxZZZ" ) } &
!$OMP : atomic update &
!$OMP hint ( int ( Z'20', kind = omp_sync_hint_kind ) ), &
!$OMP default ( atomic update )
A = A + 1
!$OMP end target
end program TargetAtomic_Metadirective
program TargetAtomic_Simple
implicit none
real :: &
A
!$OMP target
!$OMP atomic update
A = A + 1
!$OMP end target
end program TargetAtomic_Simple
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