1
0
mirror of https://github.com/OpenMP/Examples.git synced 2025-04-14 10:21:22 +01:00
2022-11-04 09:35:42 -07:00

23 lines
450 B
Fortran

! @@name: affinity.6
! @@type: F-free
! @@operation: compile
! @@expect: success
! @@version: omp_5.0
subroutine task_affinity(A, N)
external alloc_init_B
external compute_on_B
double precision, allocatable :: B(:)
!$omp task depend(out:B) shared(B) affinity(A)
call alloc_init_B(B,A)
!$omp end task
!$omp task depend(in:B) shared(B) affinity(A)
call compute_on_B(B)
!$omp end task
!$omp taskwait
end subroutine