From 50edd68a96517f3d46ec3639ec209e1c153efa4d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 8 May 2025 21:08:51 -0600 Subject: [PATCH] Avoid static variables and functions in header files. --- .../core/src/impl/Kokkos_Profiling_Interface.hpp | 8 ++++---- .../mdspan/include/experimental/__p0009_bits/extents.hpp | 2 +- .../mdspan/include/experimental/__p0009_bits/utility.hpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) 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 -- 2.39.5