dbcsr_memtype_equal Function

public function dbcsr_memtype_equal(mt1, mt2) result(res)

Test if two memtypes are equal

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_memtype_type), intent(in) :: mt1
type(dbcsr_memtype_type), intent(in) :: mt2

Return Value logical


Contents

Source Code


Source Code

   FUNCTION dbcsr_memtype_equal(mt1, mt2) RESULT(res)
      !! Test if two memtypes are equal
      TYPE(dbcsr_memtype_type), INTENT(in)               :: mt1, mt2
      LOGICAL                                            :: res

      res = (mt1%mpi .EQV. mt2%mpi) .AND. &
            (mt1%acc_hostalloc .EQV. mt2%acc_hostalloc) .AND. &
            (mt1%acc_devalloc .EQV. mt2%acc_devalloc) .AND. &
            (ASSOCIATED(mt1%pool) .EQV. ASSOCIATED(mt2%pool)) .AND. &
            (.NOT. ASSOCIATED(mt1%pool) .OR. ASSOCIATED(mt1%pool, mt2%pool))
   END FUNCTION dbcsr_memtype_equal