Returns the allocated data size of a DBCSR matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
matrix |
size of data
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