array_equality_i1d Function

private pure function array_equality_i1d(array1, array2) result(are_equal)

Arguments

Type IntentOptional Attributes Name
type(array_i1d_obj), intent(in) :: array1
type(array_i1d_obj), intent(in) :: array2

Return Value logical


Source Code

   PURE_ARRAY_EQUALITY FUNCTION array_equality_i1d(array1, array2) RESULT(are_equal)
      TYPE(array_i1d_obj), INTENT(IN)                    :: array1, array2
      LOGICAL                                            :: are_equal

      are_equal = .FALSE.
      IF (ASSOCIATED(array1%low) .AND. ASSOCIATED(array2%low)) THEN
#if TO_VERSION(1, 11) <= TO_VERSION(LIBXSMM_CONFIG_VERSION_MAJOR, LIBXSMM_CONFIG_VERSION_MINOR)
         are_equal = .NOT. libxsmm_diff(array1%low%data, array2%low%data)
#else
         IF (SIZE(array1%low%data) .NE. SIZE(array2%low%data)) RETURN
         are_equal = ALL(array1%low%data .EQ. array2%low%data)
#endif
      END IF
   END FUNCTION array_equality_i1d