From: Wolfgang Bangerth Date: Fri, 9 May 2025 03:08:51 +0000 (-0600) Subject: Avoid static variables and functions in header files. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18464%2Fhead;p=dealii.git Avoid static variables and functions in header files. --- diff --git a/bundled/kokkos-4.5.01/core/src/impl/Kokkos_Profiling_Interface.hpp b/bundled/kokkos-4.5.01/core/src/impl/Kokkos_Profiling_Interface.hpp index ddd6223be1..8fa3a2ffee 100644 --- a/bundled/kokkos-4.5.01/core/src/impl/Kokkos_Profiling_Interface.hpp +++ b/bundled/kokkos-4.5.01/core/src/impl/Kokkos_Profiling_Interface.hpp @@ -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) { diff --git a/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/extents.hpp b/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/extents.hpp index d58d37732d..0e4bec86b6 100644 --- a/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/extents.hpp +++ b/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/extents.hpp @@ -62,7 +62,7 @@ __check_compatible_extents( template MDSPAN_INLINE_FUNCTION -static constexpr bool are_valid_indices() { +constexpr bool are_valid_indices() { return _MDSPAN_FOLD_AND(std::is_convertible::value) && _MDSPAN_FOLD_AND(std::is_nothrow_constructible::value); diff --git a/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp b/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp index f7f39d6024..c4a3180afe 100644 --- a/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp +++ b/bundled/kokkos-4.5.01/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp @@ -46,7 +46,7 @@ constexpr bool rankwise_equal(with_rank, const T1& x, const T2& y, F func) return match; } -constexpr struct +inline constexpr struct extent_t { template MDSPAN_INLINE_FUNCTION @@ -56,7 +56,7 @@ constexpr struct } } extent; -constexpr struct +inline constexpr struct stride_t { template MDSPAN_INLINE_FUNCTION @@ -166,7 +166,7 @@ tuple(Elements ...) -> tuple; #endif } // namespace detail -constexpr struct mdspan_non_standard_tag { +inline constexpr struct mdspan_non_standard_tag { } mdspan_non_standard; } // namespace MDSPAN_IMPL_STANDARD_NAMESPACE