Returns 1-d data type corresponding to the given 2-D one. \return 1-D data type
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | data_type |
PURE FUNCTION dbcsr_type_2d_to_1d(data_type)
!! Returns 1-d data type corresponding to the given 2-D one.
!! \return 1-D data type
INTEGER, INTENT(IN) :: data_type
INTEGER :: dbcsr_type_2d_to_1d
SELECT CASE (data_type)
CASE (dbcsr_type_real_4_2d)
dbcsr_type_2d_to_1d = dbcsr_type_real_4
CASE (dbcsr_type_real_8_2d)
dbcsr_type_2d_to_1d = dbcsr_type_real_8
CASE (dbcsr_type_complex_4_2d)
dbcsr_type_2d_to_1d = dbcsr_type_complex_4
CASE (dbcsr_type_complex_8_2d)
dbcsr_type_2d_to_1d = dbcsr_type_complex_8
CASE (dbcsr_type_real_4)
dbcsr_type_2d_to_1d = dbcsr_type_real_4
CASE (dbcsr_type_real_8)
dbcsr_type_2d_to_1d = dbcsr_type_real_8
CASE (dbcsr_type_complex_4)
dbcsr_type_2d_to_1d = dbcsr_type_complex_4
CASE (dbcsr_type_complex_8)
dbcsr_type_2d_to_1d = dbcsr_type_complex_8
CASE default
dbcsr_type_2d_to_1d = -1
END SELECT
END FUNCTION dbcsr_type_2d_to_1d