From: Martin Kronbichler Date: Sun, 12 Mar 2017 18:58:23 +0000 (+0100) Subject: Move forward declaration of VectorizedArray to more central place X-Git-Tag: v8.5.0-rc1~43^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46c1c80838fb62334819dbf03ce6de62e0840fd3;p=dealii.git Move forward declaration of VectorizedArray to more central place --- diff --git a/include/deal.II/base/numbers.h b/include/deal.II/base/numbers.h index 83d65d5c40..84378bd9c8 100644 --- a/include/deal.II/base/numbers.h +++ b/include/deal.II/base/numbers.h @@ -26,6 +26,26 @@ DEAL_II_NAMESPACE_OPEN +// forward declarations to support abs or sqrt operations on VectorizedArray +template class VectorizedArray; +template struct EnableIfScalar; + +DEAL_II_NAMESPACE_CLOSE + +namespace std +{ + template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray + sqrt(const ::dealii::VectorizedArray &); + template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray + abs(const ::dealii::VectorizedArray &); + template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray + max(const ::dealii::VectorizedArray &, const ::dealii::VectorizedArray &); + template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray + min (const ::dealii::VectorizedArray &, const ::dealii::VectorizedArray &); +} + +DEAL_II_NAMESPACE_OPEN + /** * Namespace for the declaration of universal constants. Since the * availability in math.h is not always guaranteed, we put them here. diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 80004246a8..8597851012 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -46,26 +46,6 @@ #endif -// forward declarations -DEAL_II_NAMESPACE_OPEN -template class VectorizedArray; -template struct EnableIfScalar; -DEAL_II_NAMESPACE_CLOSE - - -namespace std -{ - template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray - sqrt(const ::dealii::VectorizedArray &); - template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray - abs(const ::dealii::VectorizedArray &); - template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray - max(const ::dealii::VectorizedArray &, const ::dealii::VectorizedArray &); - template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray - min (const ::dealii::VectorizedArray &, const ::dealii::VectorizedArray &); -} - - DEAL_II_NAMESPACE_OPEN