From 8293a5c88f1c41dd38e8fe4583da25d4d4644fec Mon Sep 17 00:00:00 2001 From: aelovikov-intel Date: Mon, 19 Feb 2024 10:12:52 -0800 Subject: [PATCH] [NFC][SYCL] Move a helper to its single legacy use (#12740) Old builtins implementation is going to be removed in the next ABI breaking window and that helper is only used there. --- sycl/include/sycl/builtins_legacy_scalar.hpp | 16 ++++++++++++++++ sycl/include/sycl/detail/generic_type_traits.hpp | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sycl/include/sycl/builtins_legacy_scalar.hpp b/sycl/include/sycl/builtins_legacy_scalar.hpp index e247e757fcadc..07be1245fb683 100644 --- a/sycl/include/sycl/builtins_legacy_scalar.hpp +++ b/sycl/include/sycl/builtins_legacy_scalar.hpp @@ -330,6 +330,22 @@ inline constexpr bool is_non_deprecated_nan_type_v = std::is_same_v, uint16_t> || std::is_same_v, uint32_t> || std::is_same_v, uint64_t>; + +template +struct convert_data_type_impl; + +template +struct convert_data_type_impl, T>> { + B operator()(T t) { return static_cast(t); } +}; + +template +struct convert_data_type_impl, T>> { + vec operator()(T t) { return t.template convert(); } +}; + +template +using convert_data_type = convert_data_type_impl; } // namespace detail template diff --git a/sycl/include/sycl/detail/generic_type_traits.hpp b/sycl/include/sycl/detail/generic_type_traits.hpp index 3bc68243859b5..9299ae4593486 100644 --- a/sycl/include/sycl/detail/generic_type_traits.hpp +++ b/sycl/include/sycl/detail/generic_type_traits.hpp @@ -405,22 +405,6 @@ template using make_unsinged_integer_t = make_type_t; -template -struct convert_data_type_impl; - -template -struct convert_data_type_impl, T>> { - B operator()(T t) { return static_cast(t); } -}; - -template -struct convert_data_type_impl, T>> { - vec operator()(T t) { return t.template convert(); } -}; - -template -using convert_data_type = convert_data_type_impl; - // TryToGetElementType::type is T::element_type or T::value_type if those // exist, otherwise T. template class TryToGetElementType {