13template <
typename LHS,
typename RHS>
16 using lhs_type =
typename LHS::value_type;
17 using rhs_type =
typename RHS::value_type;
18 static_assert(is_same_v<lhs_type, rhs_type>,
19 "operator== or operator!= : Cannot compare tensors with different scalar types");
21#ifdef COMPILETIME_CHECK_DIMENSIONS_COUNT_MISMATCH
23 static_assert(LHS::NumDims == RHS::NumDims,
"operator== or operator!= : Cannot compare tensors with different number of dimensions");
25#ifdef COMPILETIME_CHECK_DIMENSIONS_SIZE_MISMATCH
27 static_assert(dims_match<LHS::NumDims>(LHS::Dim, RHS::Dim),
28 "operator== or operator!= : there is at least one dimension mismatch");
32#if defined(RUNTIME_CHECK_DIMENSIONS_COUNT_MISMATCH) || defined(RUNTIME_CHECK_DIMENSIONS_SIZE_MISMATCH)
42template <
typename LHS,
typename RHS>
const Derived & derived() const
Definition BaseExpr.h:17
bool operator==(const BaseExpr< LHS > &lhs, const BaseExpr< RHS > &rhs)
Definition comparison.h:14
bool operator!=(const BaseExpr< LHS > &lhs, const BaseExpr< RHS > &rhs)
Definition comparison.h:43
Global configuration for the tesseract tensor library.
#define PRECISION_TOLERANCE
Tolerance for floating-point comparisons (e.g. symmetry checks, Cholesky).
Definition config.h:117
Façade for higher-level kernel operations built on top of microkernels.
void checkDimsMatch(const Expr1 &lhs, const Expr2 &rhs, const char *opName) TESSERACT_CONDITIONAL_NOEXCEPT
Definition operators_common.h:5
static FORCE_INLINE bool reduce_all_approx_equal(const Expr1 &lhs, const Expr2 &rhs, T tolerance) noexcept
Check if all logical elements of two expressions are approximately equal.
Definition kernel_ops.h:76