brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 7f034d8 Raw
124 lines · plain
1! RUN: %python %S/../test_modfile.py %s %flang_fc1 -fopenacc2 3module acc_mod4  real :: data_create(100)5  !$acc declare create(data_create)6 7  real :: data_copyin(10)8  !$acc declare copyin(data_copyin)9 10  real :: data_copyinro(10)11  !$acc declare copyin(readonly: data_copyinro)12 13  real :: data_device_resident(20)14  !$acc declare device_resident(data_device_resident)15 16  integer :: data_link(50)17  !$acc declare link(data_link)18 19  !$acc routine(sub10) seq20 21contains22  subroutine sub1()23    !$acc routine24  end subroutine25 26  subroutine sub2()27    !$acc routine seq28  end subroutine29 30  subroutine sub3()31    !$acc routine gang32  end subroutine33 34  subroutine sub4()35    !$acc routine vector36  end subroutine37 38  subroutine sub5()39    !$acc routine worker40  end subroutine41 42  subroutine sub6()43    !$acc routine gang(dim:2)44  end subroutine45 46  subroutine sub7()47    !$acc routine bind("sub7_")48  end subroutine49 50  subroutine sub8()51    !$acc routine bind(sub7)52  end subroutine53 54  subroutine sub9()55    !$acc routine vector56    !$acc routine seq bind(sub7)57    !$acc routine gang bind(sub8)58  end subroutine59 60  subroutine sub10()61  end subroutine62 63  subroutine sub11()64    !$acc routine device_type(nvidia) gang device_type(*) seq65  end subroutine66 67  subroutine sub12()68    !$acc routine device_type(host) bind(sub7) device_type(multicore) bind(sub8)69  end subroutine70end module71 72!Expect: acc_mod.mod73! module acc_mod74! real(4)::data_create(1_8:100_8)75! !$acc declare create(data_create)76! real(4)::data_copyin(1_8:10_8)77! !$acc declare copyin(data_copyin)78! real(4)::data_copyinro(1_8:10_8)79! !$acc declare copyin(readonly: data_copyinro)80! real(4)::data_device_resident(1_8:20_8)81! !$acc declare device_resident(data_device_resident)82! integer(4)::data_link(1_8:50_8)83! !$acc declare link(data_link)84! contains85! subroutine sub1()86! !$acc routine87! end88! subroutine sub2()89! !$acc routine seq90! end91! subroutine sub3()92! !$acc routine gang93! end94! subroutine sub4()95! !$acc routine vector96! end97! subroutine sub5()98! !$acc routine worker99! end100! subroutine sub6()101! !$acc routine gang(dim:2)102! end103! subroutine sub7()104! !$acc routine bind("sub7_")105! end106! subroutine sub8()107! !$acc routine bind(sub7)108! end109! subroutine sub9()110! !$acc routine vector111! !$acc routine seq bind(sub7)112! !$acc routine gang bind(sub8)113! end114! subroutine sub10()115! !$acc routine seq116! end117! subroutinesub11()118! !$acc routine device_type(nvidia) gang device_type(*) seq119! end120! subroutinesub12()121! !$acc routine device_type(host) bind(sub7) device_type(multicore) bind(sub8)122! end123! end124