Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=real_8) | :: | z | ||||
integer | :: | data_type |
FUNCTION compx_to_dbcsr_scalar(z, data_type) RESULT(res) COMPLEX(real_8) :: z INTEGER :: data_type TYPE(dbcsr_scalar_type) :: res SELECT CASE (data_type) CASE (dbcsr_type_real_4) res = dbcsr_scalar(REAL(z, kind=real_4)) CASE (dbcsr_type_real_8) res = dbcsr_scalar(REAL(z, kind=real_8)) CASE (dbcsr_type_complex_4) res = dbcsr_scalar(CMPLX(z, kind=real_4)) CASE (dbcsr_type_complex_8) res = dbcsr_scalar(z) END SELECT END FUNCTION compx_to_dbcsr_scalar