From: Martin Kronbichler Date: Tue, 8 Oct 2019 07:15:59 +0000 (+0200) Subject: Add VectorizedArray::size() function X-Git-Tag: v9.2.0-rc1~991^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95e56587b70b336331df0f9895a37270f8ac2665;p=dealii.git Add VectorizedArray::size() function --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 96395f8324..5dc022dfb1 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -216,6 +216,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator (only valid with component 0 in the base class without * specialization). @@ -684,6 +694,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator. */ @@ -1117,6 +1137,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator. */ @@ -1601,6 +1631,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator. */ @@ -2003,6 +2043,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator. */ @@ -2415,6 +2465,16 @@ public: this->operator=(scalar); } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * This function can be used to set all data fields to a given scalar. */ @@ -2788,6 +2848,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator. */ @@ -3169,6 +3239,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator. The component must be either 0 or 1. */ @@ -3401,6 +3481,16 @@ public: return *this; } + /** + * Return the number of elements in the array stored in the variable + * n_array_elements. + */ + static constexpr unsigned int + size() + { + return n_array_elements; + } + /** * Access operator. The component must be between 0 and 3. */