mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-24 23:01:22 +01:00
19 lines
372 B
Fortran
19 lines
372 B
Fortran
! @@name: target.2
|
|
! @@type: F-free
|
|
! @@compilable: yes
|
|
! @@linkable: no
|
|
! @@expect: success
|
|
! @@version: omp_4.0
|
|
subroutine vec_mult(N)
|
|
integer :: i,N
|
|
real :: p(N), v1(N), v2(N)
|
|
call init(v1, v2, N)
|
|
!$omp target map(v1,v2,p)
|
|
!$omp parallel do
|
|
do i=1,N
|
|
p(i) = v1(i) * v2(i)
|
|
end do
|
|
!$omp end target
|
|
call output(p, N)
|
|
end subroutine
|