From: Wolfgang Bangerth Date: Fri, 18 Oct 2019 05:39:59 +0000 (-0600) Subject: Minor code and documentation updates. X-Git-Tag: v9.2.0-rc1~972^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8922%2Fhead;p=dealii.git Minor code and documentation updates. --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 58f40cbc6d..d39cc14a0f 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -99,7 +99,7 @@ public: * @param data The actual VectorizedArray. * @param lane A pointer to the current lane. */ - VectorizedArrayIterator(T &data, unsigned int lane) + VectorizedArrayIterator(T &data, const unsigned int lane) : data(data) , lane(lane) {} @@ -162,11 +162,13 @@ private: /** - * A base class for the VectorizedArray specialization, containing common - * functionalities. + * A base class for the various VectorizedArray template specializations, + * containing common functionalities. * - * @tparam Type of the actual vectorized array. We are using CRTP to prevent - * the usage of the virtual keyword. + * @tparam T Type of the actual vectorized array. We are using the + * Couriously Recurring Template Pattern (see + * https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern) in this + * class to avoid having to resort to `virtual` member functions. * * @author Peter Munch, 2019 */ @@ -194,27 +196,27 @@ public: } /** - * @return An iterator pointing to the end of the underlying data. + * @return An iterator pointing to the beginning of the underlying data (`const` + * version). */ - VectorizedArrayIterator - end() + VectorizedArrayIterator + begin() const { - return VectorizedArrayIterator(static_cast(*this), - T::n_array_elements); + return VectorizedArrayIterator(static_cast(*this), 0); } /** - * @return An iterator pointing to the beginning of the underlying data (const - * version). + * @return An iterator pointing to the end of the underlying data. */ - VectorizedArrayIterator - begin() const + VectorizedArrayIterator + end() { - return VectorizedArrayIterator(static_cast(*this), 0); + return VectorizedArrayIterator(static_cast(*this), + T::n_array_elements); } /** - * @return An iterator pointing to the end of the underlying data (const + * @return An iterator pointing to the end of the underlying data (`const` * version). */ VectorizedArrayIterator