From: Bruno Turcksin Date: Wed, 15 Mar 2023 21:03:21 +0000 (-0400) Subject: Make more functions __host__ __device__ X-Git-Tag: v9.5.0-rc1~349^2~15 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f06df62f8665fdace11b394df9481dcd42f6abd8;p=dealii.git Make more functions __host__ __device__ --- 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;