From 46c1c80838fb62334819dbf03ce6de62e0840fd3 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sun, 12 Mar 2017 19:58:23 +0100 Subject: [PATCH] Move forward declaration of VectorizedArray to more central place --- include/deal.II/base/numbers.h | 20 ++++++++++++++++++++ include/deal.II/base/vectorization.h | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) 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 -- 2.39.5