dbcsr_get_data_size Function

public function dbcsr_get_data_size(matrix) result(data_size)

Returns the allocated data size of a DBCSR matrix

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: matrix

matrix

Return Value integer

size of data


Source Code

   FUNCTION dbcsr_get_data_size(matrix) RESULT(data_size)
      !! Returns the allocated data size of a DBCSR matrix

      TYPE(dbcsr_type), INTENT(IN)                       :: matrix
         !! matrix
      INTEGER                                            :: data_size
         !! size of data

      INTEGER                                            :: data_type

      data_size = 0
      data_type = dbcsr_get_data_type(matrix)
      IF (data_type .NE. dbcsr_type_real_8 .AND. &
          data_type .NE. dbcsr_type_real_4 .AND. &
          data_type .NE. dbcsr_type_complex_8 .AND. &
          data_type .NE. dbcsr_type_complex_4) DBCSR_ABORT("Incorrect data type")
      data_size = dbcsr_data_get_size(matrix%data_area)
   END FUNCTION dbcsr_get_data_size