pointer_i_rank_remap2 Subroutine

private subroutine pointer_i_rank_remap2(r2p, d1, d2, r1p)

Sets a rank-2 pointer to rank-1 data using Fortran 2003 pointer rank remapping.

Arguments

TypeIntentOptionalAttributesName
integer(kind=int_4), DIMENSION(:, :), POINTER:: r2p
integer, intent(in) :: d1
integer, intent(in) :: d2
integer(kind=int_4), DIMENSION(:), POINTER:: r1p

Contents

Source Code


Source Code

      SUBROUTINE pointer_i_rank_remap2(r2p, d1, d2, r1p)
     !! Sets a rank-2 pointer to rank-1 data using Fortran 2003 pointer
     !! rank remapping.

         INTEGER, INTENT(IN)                      :: d1, d2
         INTEGER(kind=int_4), DIMENSION(:, :), &
            POINTER                                :: r2p
         INTEGER(kind=int_4), DIMENSION(:), &
            POINTER                                :: r1p

         r2p(1:d1, 1:d2) => r1p(1:d1*d2)
      END SUBROUTINE pointer_i_rank_remap2