dbcsr_t_get_mapping_info Subroutine

public pure subroutine dbcsr_t_get_mapping_info(map, ndim_nd, ndim1_2d, ndim2_2d, dims_2d_i8, dims_2d, dims_nd, dims1_2d, dims2_2d, map1_2d, map2_2d, map_nd, base, col_major)

get mapping info

Arguments

Type IntentOptional Attributes Name
type(nd_to_2d_mapping), intent(in) :: map

index mapping data.

integer, intent(out), optional :: ndim_nd

number of dimensions number of dimensions that map to first 2d index number of dimensions that map to first 2d index

integer, intent(out), optional :: ndim1_2d

number of dimensions number of dimensions that map to first 2d index number of dimensions that map to first 2d index

integer, intent(out), optional :: ndim2_2d

number of dimensions number of dimensions that map to first 2d index number of dimensions that map to first 2d index

integer(kind=int_8), intent(out), optional, DIMENSION(2) :: dims_2d_i8
integer, intent(out), optional, DIMENSION(2) :: dims_2d

2d dimensions

integer, intent(out), optional, DIMENSION(ndims_mapping(map)) :: dims_nd

nd dimensions

integer, intent(out), optional, DIMENSION(ndims_mapping_row(map)) :: dims1_2d

dimensions that map to first 2d index

integer, intent(out), optional, DIMENSION(ndims_mapping_column(map)) :: dims2_2d

dimensions that map to second 2d index

integer, intent(out), optional, DIMENSION(ndims_mapping_row(map)) :: map1_2d

indices that map to first 2d index

integer, intent(out), optional, DIMENSION(ndims_mapping_column(map)) :: map2_2d

indices that map to second 2d index

integer, intent(out), optional, DIMENSION(ndims_mapping(map)) :: map_nd

inverse of [map1_2d, map2_2d]

integer, intent(out), optional :: base

base index

logical, intent(out), optional :: col_major

is index in column major order


Source Code

   PURE SUBROUTINE dbcsr_t_get_mapping_info(map, ndim_nd, ndim1_2d, ndim2_2d, dims_2d_i8, dims_2d, dims_nd, dims1_2d, dims2_2d, &
                                            map1_2d, map2_2d, map_nd, base, col_major)
      !! get mapping info

      TYPE(nd_to_2d_mapping), INTENT(IN)                 :: map
         !! index mapping data.
      INTEGER, INTENT(OUT), OPTIONAL                     :: ndim_nd, ndim1_2d, ndim2_2d
         !! number of dimensions
         !! number of dimensions that map to first 2d index
         !! number of dimensions that map to first 2d index
      INTEGER(KIND=int_8), DIMENSION(2), INTENT(OUT), OPTIONAL       :: dims_2d_i8
      INTEGER, DIMENSION(2), INTENT(OUT), OPTIONAL :: dims_2d
         !! 2d dimensions
      INTEGER, DIMENSION(ndims_mapping(map)), &
         INTENT(OUT), OPTIONAL                           :: dims_nd
         !! nd dimensions
      INTEGER, DIMENSION(ndims_mapping_row(map)), INTENT(OUT), &
         OPTIONAL                                        :: dims1_2d
         !! dimensions that map to first 2d index
      INTEGER, DIMENSION(ndims_mapping_column(map)), INTENT(OUT), &
         OPTIONAL                                        :: dims2_2d
         !! dimensions that map to second 2d index
      INTEGER, DIMENSION(ndims_mapping_row(map)), INTENT(OUT), &
         OPTIONAL                                        :: map1_2d
         !! indices that map to first 2d index
      INTEGER, DIMENSION(ndims_mapping_column(map)), INTENT(OUT), &
         OPTIONAL                                        :: map2_2d
         !! indices that map to second 2d index
      INTEGER, DIMENSION(ndims_mapping(map)), &
         INTENT(OUT), OPTIONAL                           :: map_nd
         !! inverse of [map1_2d, map2_2d]
      INTEGER, INTENT(OUT), OPTIONAL                     :: base
         !! base index
      LOGICAL, INTENT(OUT), OPTIONAL                     :: col_major
         !! is index in column major order

      IF (PRESENT(ndim_nd)) ndim_nd = map%ndim_nd
      IF (PRESENT(ndim1_2d)) ndim1_2d = map%ndim1_2d
      IF (PRESENT(ndim2_2d)) ndim2_2d = map%ndim2_2d
      IF (PRESENT(dims_2d_i8)) dims_2d_i8(:) = map%dims_2d(:)
      IF (PRESENT(dims_2d)) dims_2d(:) = INT(map%dims_2d(:))
      IF (PRESENT(dims_nd)) THEN
         dims_nd(:) = map%dims_nd(:)
      END IF
      IF (PRESENT(dims1_2d)) THEN
         dims1_2d(:) = map%dims1_2d
      END IF
      IF (PRESENT(dims2_2d)) THEN
         dims2_2d(:) = map%dims2_2d
      END IF
      IF (PRESENT(map1_2d)) THEN
         map1_2d(:) = map%map1_2d
      END IF
      IF (PRESENT(map2_2d)) THEN
         map2_2d(:) = map%map2_2d
      END IF
      IF (PRESENT(map_nd)) THEN
         map_nd(:) = map%map_nd(:)
      END IF
      IF (PRESENT(base)) THEN
         base = map%base
      END IF
      IF (PRESENT(col_major)) THEN
         col_major = map%col_major
      END IF

   END SUBROUTINE dbcsr_t_get_mapping_info