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 {