From b082d8f62183c0b3229be092e8f8e87d3511775c Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 12 Aug 2017 01:04:41 -0600 Subject: [PATCH] Added operator== for VectorizedArray --- include/deal.II/base/vectorization.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 96231eaf35..74dbedf6ba 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -2706,6 +2706,25 @@ vectorized_transpose_and_store(const bool add_into, #endif // if DEAL_II_COMPILER_VECTORIZATION_LEVEL > 0 +/** + * Relational operator == for VectorizedArray + * + * @relates VectorizedArray + */ +template +inline DEAL_II_ALWAYS_INLINE +bool +operator == (const VectorizedArray &lhs, + const VectorizedArray &rhs) +{ + for (unsigned int i=0; i::n_array_elements; ++i) + if (lhs[i] != rhs[i]) + return false; + + return true; +} + + /** * Addition of two vectorized arrays with operator +. * -- 2.39.5