1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
! RUN: %python %S/../test_modfile.py %s %flang_fc1 -fopenacc
module acc_mod
real :: data_create(100)
!$acc declare create(data_create)
real :: data_copyin(10)
!$acc declare copyin(data_copyin)
real :: data_copyinro(10)
!$acc declare copyin(readonly: data_copyinro)
real :: data_device_resident(20)
!$acc declare device_resident(data_device_resident)
integer :: data_link(50)
!$acc declare link(data_link)
!$acc routine(sub10) seq
contains
subroutine sub1()
!$acc routine
end subroutine
subroutine sub2()
!$acc routine seq
end subroutine
subroutine sub3()
!$acc routine gang
end subroutine
subroutine sub4()
!$acc routine vector
end subroutine
subroutine sub5()
!$acc routine worker
end subroutine
subroutine sub6()
!$acc routine gang(dim:2)
end subroutine
subroutine sub7()
!$acc routine bind("sub7_")
end subroutine
subroutine sub8()
!$acc routine bind(sub7)
end subroutine
subroutine sub9()
!$acc routine vector
!$acc routine seq bind(sub7)
!$acc routine gang bind(sub8)
end subroutine
subroutine sub10()
end subroutine
subroutine sub11()
!$acc routine device_type(nvidia) gang device_type(*) seq
end subroutine
subroutine sub12()
!$acc routine device_type(host) bind(sub7) device_type(multicore) bind(sub8)
end subroutine
end module
!Expect: acc_mod.mod
! module acc_mod
! real(4)::data_create(1_8:100_8)
! !$acc declare create(data_create)
! real(4)::data_copyin(1_8:10_8)
! !$acc declare copyin(data_copyin)
! real(4)::data_copyinro(1_8:10_8)
! !$acc declare copyin(readonly: data_copyinro)
! real(4)::data_device_resident(1_8:20_8)
! !$acc declare device_resident(data_device_resident)
! integer(4)::data_link(1_8:50_8)
! !$acc declare link(data_link)
! contains
! subroutine sub1()
! !$acc routine
! end
! subroutine sub2()
! !$acc routine seq
! end
! subroutine sub3()
! !$acc routine gang
! end
! subroutine sub4()
! !$acc routine vector
! end
! subroutine sub5()
! !$acc routine worker
! end
! subroutine sub6()
! !$acc routine gang(dim:2)
! end
! subroutine sub7()
! !$acc routine bind("sub7_")
! end
! subroutine sub8()
! !$acc routine bind(sub7)
! end
! subroutine sub9()
! !$acc routine vector
! !$acc routine seq bind(sub7)
! !$acc routine gang bind(sub8)
! end
! subroutine sub10()
! !$acc routine seq
! end
! subroutinesub11()
! !$acc routine device_type(nvidia) gang device_type(*) seq
! end
! subroutinesub12()
! !$acc routine device_type(host) bind(sub7) device_type(multicore) bind(sub8)
! end
! end
|