| 1 | module transformation_module_hoist |
| 2 | USE subroutines_mod, only: kernel1, kernel2, device1, device2, kernel3 |
| 3 | implicit none |
| 4 | integer, parameter :: len = 3 |
| 5 | contains |
| 6 | |
| 7 | subroutine driver(a, b, c) |
| 8 | integer, intent(in) :: a |
| 9 | integer, intent(inout) :: b(a) |
| 10 | integer, intent(inout) :: c(a, len) |
| 11 | real :: x, y |
| 12 | call kernel1(a, b, c) |
| 13 | call kernel2(a, b) |
| 14 | call kernel1(a, b, c) |
| 15 | end subroutine driver |
| 16 | |
| 17 | subroutine another_driver(a, b, c) |
| 18 | integer, intent(in) :: a |
| 19 | integer, intent(inout) :: b(a) |
| 20 | integer, intent(inout) :: c(a, len) |
| 21 | real :: x, y |
| 22 | call kernel1(a, b, c) |
| 23 | end subroutine another_driver |
| 24 | |
| 25 | subroutine yet_another_driver(a, a1) |
| 26 | integer, intent(in) :: a, a1 |
| 27 | |
| 28 | call kernel3(a, a1) |
| 29 | end subroutine yet_another_driver |
| 30 | |
| 31 | end module transformation_module_hoist |
| 32 |