OpenMP-Examples/devices/sources/target_unstructured_data.1.f90
2022-11-04 09:35:42 -07:00

25 lines
459 B
Fortran

! @@name: target_unstructured_data.1
! @@type: F-free
! @@operation: compile
! @@expect: success
! @@version: omp_4.5
module example
real(8), allocatable :: A(:)
contains
subroutine initialize(N)
integer :: N
allocate(A(N))
!$omp target enter data map(alloc:A)
end subroutine initialize
subroutine finalize()
!$omp target exit data map(delete:A)
deallocate(A)
end subroutine finalize
end module example