From f06df62f8665fdace11b394df9481dcd42f6abd8 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 15 Mar 2023 17:03:21 -0400 Subject: [PATCH] Make more functions __host__ __device__ --- include/deal.II/base/numbers.h | 2 +- include/deal.II/base/tensor.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/deal.II/base/numbers.h b/include/deal.II/base/numbers.h index b4b1d6214f..412a8a76d1 100644 --- a/include/deal.II/base/numbers.h +++ b/include/deal.II/base/numbers.h @@ -724,7 +724,7 @@ namespace internal // Type T is explicitly convertible (but not constructible) from F. template - static constexpr DEAL_II_ALWAYS_INLINE T + static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE T value(const F &f, std::enable_if_t::type, typename std::decay::type>::value && diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index ed5a8ebbb3..740acd2752 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -956,14 +956,15 @@ namespace internal template struct NumberType> { - static constexpr DEAL_II_ALWAYS_INLINE const Tensor & - value(const Tensor &t) + static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE const + Tensor & + value(const Tensor &t) { return t; } - static constexpr DEAL_II_ALWAYS_INLINE Tensor - value(const T &t) + static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Tensor + value(const T &t) { Tensor tmp; tmp = t; -- 2.39.5