]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid static variables and functions in header files. 18464/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 9 May 2025 03:08:51 +0000 (21:08 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 May 2025 00:49:17 +0000 (18:49 -0600)
bundled/kokkos-4.5.01/core/src/impl/Kokkos_Profiling_Interface.hpp
bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/extents.hpp
bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp

index ddd6223be1c506632768ae496d61134cef2e82ff..8fa3a2ffee55b819b21252a7901c1b4657736e20 100644 (file)
@@ -56,10 +56,10 @@ struct ExecutionSpaceIdentifier {
   uint32_t instance_id;
 };
 
-constexpr const uint32_t num_type_bits     = 8;
-constexpr const uint32_t num_device_bits   = 7;
-constexpr const uint32_t num_instance_bits = 17;
-constexpr const uint32_t num_avail_bits    = sizeof(uint32_t) * CHAR_BIT;
+inline constexpr const uint32_t num_type_bits     = 8;
+inline constexpr const uint32_t num_device_bits   = 7;
+inline constexpr const uint32_t num_instance_bits = 17;
+inline constexpr const uint32_t num_avail_bits    = sizeof(uint32_t) * CHAR_BIT;
 
 inline DeviceType devicetype_from_uint32t(const uint32_t in) {
   switch (in) {
index d58d37732dda6896b45cc69e10d5c6dc5855db2b..0e4bec86b6ba53461c8d1206dd79b5456a11be19 100644 (file)
@@ -62,7 +62,7 @@ __check_compatible_extents(
 
 template<class IndexType, class ... Arguments>
 MDSPAN_INLINE_FUNCTION
-static constexpr bool are_valid_indices() {
+constexpr bool are_valid_indices() {
     return
       _MDSPAN_FOLD_AND(std::is_convertible<Arguments, IndexType>::value) &&
       _MDSPAN_FOLD_AND(std::is_nothrow_constructible<IndexType, Arguments>::value);
index f7f39d6024e829cb46b25efd04522f7327d63e8c..c4a3180afee7f0c68c0f6bb2cb90bf30c8b74f53 100644 (file)
@@ -46,7 +46,7 @@ constexpr bool rankwise_equal(with_rank<N>, const T1& x, const T2& y, F func)
   return match;
 }
 
-constexpr struct
+inline constexpr struct extent_t
 {
   template <class T, class I>
   MDSPAN_INLINE_FUNCTION
@@ -56,7 +56,7 @@ constexpr struct
   }
 } extent;
 
-constexpr struct
+inline constexpr struct stride_t
 {
   template <class T, class I>
   MDSPAN_INLINE_FUNCTION
@@ -166,7 +166,7 @@ tuple(Elements ...) -> tuple<Elements...>;
 #endif
 } // namespace detail
 
-constexpr struct mdspan_non_standard_tag {
+inline constexpr struct mdspan_non_standard_tag {
 } mdspan_non_standard;
 
 } // namespace MDSPAN_IMPL_STANDARD_NAMESPACE

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.