From: Jean-Paul Pelteret Date: Sat, 12 Aug 2017 07:04:41 +0000 (-0600) Subject: Added operator== for VectorizedArray X-Git-Tag: v9.0.0-rc1~1244^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b082d8f62183c0b3229be092e8f8e87d3511775c;p=dealii.git Added operator== for VectorizedArray --- 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 +. *