From 50ba40c49f0f1cdc2cc63fb1d1f96c6ac78f29c8 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Tue, 24 Sep 2024 03:34:35 -0700 Subject: [PATCH] Drop unused type traits --- sycl/include/sycl/detail/type_traits.hpp | 30 ++---------------------- sycl/test/type_traits/type_traits.cpp | 22 ----------------- 2 files changed, 2 insertions(+), 50 deletions(-) diff --git a/sycl/include/sycl/detail/type_traits.hpp b/sycl/include/sycl/detail/type_traits.hpp index d024a109bfd75..fc3cd7807dd85 100644 --- a/sycl/include/sycl/detail/type_traits.hpp +++ b/sycl/include/sycl/detail/type_traits.hpp @@ -441,27 +441,6 @@ struct remove_pointer : remove_pointer_impl> {}; template using remove_pointer_t = typename remove_pointer::type; -// is_address_space_compliant -template -struct is_address_space_compliant_impl : std::false_type {}; - -template -struct is_address_space_compliant_impl : std::true_type {}; - -template -struct is_address_space_compliant_impl, - SpaceList> - : std::bool_constant::value> {}; - -template -struct is_address_space_compliant - : is_address_space_compliant_impl, SpaceList> {}; - -template -inline constexpr bool is_address_space_compliant_v = - is_address_space_compliant::value; - // make_type_t template struct make_type_impl { using type = find_same_size_type_t; @@ -514,6 +493,8 @@ struct make_larger_impl, marray> { using type = std::conditional_t; }; +// TODO: this type trait is not used anyweher in SYCL headers and it should +// be moved to the library code template struct make_larger { using type = typename make_larger_impl::type; }; @@ -530,13 +511,6 @@ template using const_if_const_AS = DataT; #endif -template struct function_traits {}; - -template struct function_traits { - using ret_type = Ret; - using args_type = std::tuple; -}; - // No first_type_t due to // https://open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1430. template struct first_type { diff --git a/sycl/test/type_traits/type_traits.cpp b/sycl/test/type_traits/type_traits.cpp index 25ac39b8e9bf7..a53bec3d0008b 100644 --- a/sycl/test/type_traits/type_traits.cpp +++ b/sycl/test/type_traits/type_traits.cpp @@ -72,12 +72,6 @@ void test_remove_pointer_t() { ""); } -template -void test_is_address_space_compliant() { - static_assert(d::is_address_space_compliant::value == Expected, - ""); -} - template void test_vector_size() { static_assert((d::vector_size::value == Checked) == Expected, ""); @@ -102,22 +96,6 @@ int main() { test_remove_pointer_t, s::int2>(); test_remove_pointer_t, s::float2>(); - test_is_address_space_compliant(); - test_is_address_space_compliant(); - test_is_address_space_compliant, - d::gvl::nonconst_address_space_list, false>(); - test_is_address_space_compliant, - d::gvl::nonconst_address_space_list, false>(); - test_is_address_space_compliant(); - test_is_address_space_compliant(); - test_is_address_space_compliant, - d::gvl::nonconst_address_space_list, false>(); - test_is_address_space_compliant, - d::gvl::nonconst_address_space_list, false>(); - test_is_integral(); test_is_integral(); test_is_integral();