]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make more functions __host__ __device__
authorBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 15 Mar 2023 21:03:21 +0000 (17:03 -0400)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 6 Apr 2023 13:10:39 +0000 (13:10 +0000)
include/deal.II/base/numbers.h
include/deal.II/base/tensor.h

index b4b1d6214fe74dbd22390ccab545b47c14c2c5d6..412a8a76d1c5b49484e054f9672b47617c738e22 100644 (file)
@@ -724,7 +724,7 @@ namespace internal
 
     // Type T is explicitly convertible (but not constructible) from F.
     template <typename F>
-    static constexpr DEAL_II_ALWAYS_INLINE T
+    static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE T
     value(const F &f,
           std::enable_if_t<!std::is_same<typename std::decay<T>::type,
                                          typename std::decay<F>::type>::value &&
index ed5a8ebbb316fd771b754fa318421fcdec358f29..740acd27523ef5dcaf11c37adf567b93a85c19bc 100644 (file)
@@ -956,14 +956,15 @@ namespace internal
   template <int rank, int dim, typename T>
   struct NumberType<Tensor<rank, dim, T>>
   {
-    static constexpr DEAL_II_ALWAYS_INLINE const Tensor<rank, dim, T> &
-    value(const Tensor<rank, dim, T> &t)
+    static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE const
+      Tensor<rank, dim, T> &
+      value(const Tensor<rank, dim, T> &t)
     {
       return t;
     }
 
-    static constexpr DEAL_II_ALWAYS_INLINE Tensor<rank, dim, T>
-                                           value(const T &t)
+    static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Tensor<rank, dim, T>
+                                                       value(const T &t)
     {
       Tensor<rank, dim, T> tmp;
       tmp = t;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.