| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=C_INT), | value | :: | nthet | |||
| integer(kind=C_INT), | value | :: | nzeta | |||
| real(kind=CWP), | intent(in) | :: | arr_in(nthet,nzeta) | |||
| real(kind=CWP), | intent(out) | :: | arr_out(nthet,nzeta) |
subroutine test_pass_arrays_shift_c( & nthet, nzeta, arr_in, arr_out) & bind(c, name = "test_pass_arrays_shift") integer(kind=C_INT), value :: nthet, nzeta real(kind=CWP),intent(in) :: arr_in(nthet,nzeta) real(kind=CWP),intent(out) :: arr_out(nthet,nzeta) call simple_shift(arr_in, arr_out, nthet*nzeta) contains subroutine simple_shift(a_in, a_out, size) integer(kind=C_INT), intent(in) :: size real(kind=CWP),intent(in) :: a_in(size) real(kind=CWP),intent(out) :: a_out(size) integer :: i forall(i=1:size) a_out(i) = a_in(i) + i end subroutine simple_shift end subroutine test_pass_arrays_shift_c