]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move misplaced #defines from numbers.h to config.h. 18103/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Feb 2025 16:14:51 +0000 (09:14 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Feb 2025 16:15:16 +0000 (09:15 -0700)
include/deal.II/base/config.h.in
include/deal.II/base/numbers.h

index 448ece008d88fb79ef29006fc8b32e715bb264b5..65e8e55ffffa2e3b511bf78d31c09eaf3a34ac83 100644 (file)
 #cmakedefine DEAL_II_RESTRICT @DEAL_II_RESTRICT@
 #cmakedefine DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
 
+
+#define DEAL_II_HOST_DEVICE KOKKOS_FUNCTION
+#define DEAL_II_HOST_DEVICE_ALWAYS_INLINE KOKKOS_FORCEINLINE_FUNCTION
+
+// clang++ assumes that all constexpr functions are __host__ __device__ when
+// Kokkos was configured with CUDA or HIP support. This is problematic
+// when calling non-constexpr functions in constexpr functions. Hence, we
+// need a way to annotate functions explicitly as host-only.
+#if (defined(__clang__) && defined(__CUDA__)) || defined(KOKKOS_ENABLE_HIP)
+#  define DEAL_II_HOST __host__
+#else
+#  define DEAL_II_HOST
+#endif
+
+
 /***********************************************************************
  * CPU features:
  *
index 2a1b8918af9d5c1ba2a03a82011cdcdbf3560825..fb8926155c25f5592b6f2dcebc5e679934f3115a 100644 (file)
 #include <cstddef>
 #include <type_traits>
 
-#define DEAL_II_HOST_DEVICE KOKKOS_FUNCTION
-#define DEAL_II_HOST_DEVICE_ALWAYS_INLINE KOKKOS_FORCEINLINE_FUNCTION
-
-// clang++ assumes that all constexpr functions are __host__ __device__ when
-// Kokkos was configured with CUDA or HIP support. This is problematic
-// when calling non-constexpr functions in constexpr functions. Hence, we
-// need a way to annotate functions explicitly as host-only.
-#if (defined(__clang__) && defined(__CUDA__)) || defined(KOKKOS_ENABLE_HIP)
-#  define DEAL_II_HOST __host__
-#else
-#  define DEAL_II_HOST
-#endif
-
 // Forward-declare the automatic differentiation types so we can add prototypes
 // for our own wrappers.
 #ifdef DEAL_II_WITH_ADOLC

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.