aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/plugins/ArrayCwiseBinaryOps.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-29 13:41:26 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-29 13:41:26 -0700
commit07a247dcf4e86f9f741b68e1d8e0897de3eeca57 (patch)
treed103bd20faa1f103035bac2f21507ecc65f97f68 /Eigen/src/plugins/ArrayCwiseBinaryOps.h
parentfa5a8f055aebbf4f39fca26e857351103fab4d11 (diff)
parent0f3c4c8ff4a6635db77195a8919c743f34181cc2 (diff)
Pulled latest updates from upstream
Diffstat (limited to 'Eigen/src/plugins/ArrayCwiseBinaryOps.h')
-rw-r--r--Eigen/src/plugins/ArrayCwiseBinaryOps.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/Eigen/src/plugins/ArrayCwiseBinaryOps.h b/Eigen/src/plugins/ArrayCwiseBinaryOps.h
index 9422c40bc..5694592d6 100644
--- a/Eigen/src/plugins/ArrayCwiseBinaryOps.h
+++ b/Eigen/src/plugins/ArrayCwiseBinaryOps.h
@@ -280,3 +280,21 @@ operator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());
}
+/** \returns an expression of the coefficient-wise ^ operator of *this and \a other
+ *
+ * \warning this operator is for expression of bool only.
+ *
+ * Example: \include Cwise_boolean_xor.cpp
+ * Output: \verbinclude Cwise_boolean_xor.out
+ *
+ * \sa operator&&(), select()
+ */
+template<typename OtherDerived>
+EIGEN_DEVICE_FUNC
+inline const CwiseBinaryOp<internal::scalar_boolean_xor_op, const Derived, const OtherDerived>
+operator^(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
+{
+ EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
+ THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
+ return CwiseBinaryOp<internal::scalar_boolean_xor_op, const Derived, const OtherDerived>(derived(),other.derived());
+}