dbcsr_data_get_sizes_2 Subroutine

private subroutine dbcsr_data_get_sizes_2(area, row_size, col_size, valid)

Returns the allocated data size

Arguments

Type IntentOptional Attributes Name
type(dbcsr_data_obj), intent(in) :: area

data area to query for size, should be 2-D

integer, intent(out) :: row_size

row size column size

integer, intent(out) :: col_size

row size column size

logical, intent(out) :: valid

whether the data is actually allocated


Source Code

   SUBROUTINE dbcsr_data_get_sizes_2(area, row_size, col_size, valid)
      !! Returns the allocated data size

      TYPE(dbcsr_data_obj), INTENT(IN)                   :: area
         !! data area to query for size, should be 2-D
      INTEGER, INTENT(OUT)                               :: row_size, col_size
         !! row size
         !! column size
      LOGICAL, INTENT(OUT)                               :: valid
         !! whether the data is actually allocated

      CHARACTER(len=*), PARAMETER :: routineN = 'dbcsr_data_get_sizes_2'

      INTEGER                                            :: handle
      INTEGER, DIMENSION(2)                              :: s

!   ---------------------------------------------------------------------------

      IF (careful_mod) &
         CALL timeset(routineN, handle)
      IF (ASSOCIATED(area%d)) THEN
         IF (careful_mod .AND. .NOT. dbcsr_type_is_2d(area%d%data_type)) &
            DBCSR_ABORT("1-D data can not have column size")
         CALL dbcsr_data_get_sizes_any(area, s, valid)
         row_size = s(1)
         col_size = s(2)
      ELSE
         valid = .FALSE.
         row_size = 0
         col_size = 0
      END IF
      IF (careful_mod) &
         CALL timestop(handle)
   END SUBROUTINE dbcsr_data_get_sizes_2