From 4bb0968c93075b1e49c5363bb20cba16cae45c3e Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Sun, 23 Oct 2022 11:41:05 +0200 Subject: [PATCH] Mark trait constants as inline Mark trait constants as inline, and simplify the definition of the trait types. --- .../AlpakaInterface/interface/traits.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/HeterogeneousCore/AlpakaInterface/interface/traits.h b/HeterogeneousCore/AlpakaInterface/interface/traits.h index 8235a4166f4e9..3083cda79833d 100644 --- a/HeterogeneousCore/AlpakaInterface/interface/traits.h +++ b/HeterogeneousCore/AlpakaInterface/interface/traits.h @@ -32,37 +32,34 @@ namespace cms::alpakatools { // is_platform template - struct is_platform - : std::integral_constant::value> {}; + using is_platform = alpaka::concepts::ImplementsConcept; template - constexpr bool is_platform_v = is_platform::value; + inline constexpr bool is_platform_v = is_platform::value; // is_device template - struct is_device : std::integral_constant::value> {}; + using is_device = alpaka::concepts::ImplementsConcept; template - constexpr bool is_device_v = is_device::value; + inline constexpr bool is_device_v = is_device::value; // is_accelerator template - struct is_accelerator - : std::integral_constant::value> {}; + using is_accelerator = alpaka::concepts::ImplementsConcept; template - constexpr bool is_accelerator_v = is_accelerator::value; + inline constexpr bool is_accelerator_v = is_accelerator::value; // is_queue template - struct is_queue : std::integral_constant::value> { - }; + using is_queue = alpaka::concepts::ImplementsConcept; template - constexpr bool is_queue_v = is_queue::value; + inline constexpr bool is_queue_v = is_queue::value; } // namespace cms::alpakatools