Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][NFC] Drop unused type traits from public headers #15487

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions sycl/include/sycl/detail/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,6 @@ size_t getLinearIndex(const T<Dims> &Index, const U<Dims> &Range) {
return LinearIndex;
}

template <typename T> struct InlineVariableHelper {
static constexpr T value{};
};

template <typename T> constexpr T InlineVariableHelper<T>::value;

// The function extends or truncates number of dimensions of objects of id
// or ranges classes. When extending the new values are filled with
// DefaultValue, truncation just removes extra values.
Expand Down
101 changes: 3 additions & 98 deletions sycl/include/sycl/detail/generic_type_lists.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,59 +119,6 @@ using scalar_vector_floating_list =
using floating_list =
tl_append<scalar_floating_list, vector_floating_list, marray_floating_list>;

// geometric floating point types
using scalar_geo_half_list = type_list<half>;

using scalar_geo_float_list = type_list<float>;

using scalar_geo_double_list = type_list<double>;

using vector_geo_half_list =
type_list<vec<half, 1>, vec<half, 2>, vec<half, 3>, vec<half, 4>>;

using vector_geo_float_list =
type_list<vec<float, 1>, vec<float, 2>, vec<float, 3>, vec<float, 4>>;

using vector_geo_double_list =
type_list<vec<double, 1>, vec<double, 2>, vec<double, 3>, vec<double, 4>>;

using marray_geo_float_list =
type_list<marray<float, 2>, marray<float, 3>, marray<float, 4>>;

using marray_geo_double_list =
type_list<marray<double, 2>, marray<double, 3>, marray<double, 4>>;

using geo_half_list = tl_append<scalar_geo_half_list, vector_geo_half_list>;

using geo_float_list = tl_append<scalar_geo_float_list, vector_geo_float_list>;

using geo_double_list =
tl_append<scalar_geo_double_list, vector_geo_double_list>;

using scalar_geo_list = tl_append<scalar_geo_half_list, scalar_geo_float_list,
scalar_geo_double_list>;

using vector_geo_list = tl_append<vector_geo_half_list, vector_geo_float_list,
vector_geo_double_list>;

using marray_geo_list =
tl_append<marray_geo_float_list, marray_geo_double_list>;

using geo_list = tl_append<scalar_geo_list, vector_geo_list>;

// cross floating point types
using cross_half_list = type_list<vec<half, 3>, vec<half, 4>>;

using cross_float_list = type_list<vec<float, 3>, vec<float, 4>>;

using cross_double_list = type_list<vec<double, 3>, vec<double, 4>>;

using cross_floating_list =
tl_append<cross_float_list, cross_double_list, cross_half_list>;

using cross_marray_list = type_list<marray<float, 3>, marray<float, 4>,
marray<double, 3>, marray<double, 4>>;

using scalar_default_char_list = type_list<char>;

using vector_default_char_list =
Expand All @@ -197,10 +144,6 @@ using marray_signed_char_list =
marray<signed char, 3>, marray<signed char, 4>,
marray<signed char, 8>, marray<signed char, 16>>;

using signed_char_list =
tl_append<scalar_signed_char_list, vector_signed_char_list,
marray_signed_char_list>;

using scalar_unsigned_char_list = type_list<unsigned char>;

using vector_unsigned_char_list =
Expand All @@ -213,24 +156,6 @@ using marray_unsigned_char_list =
marray<unsigned char, 3>, marray<unsigned char, 4>,
marray<unsigned char, 8>, marray<unsigned char, 16>>;

using unsigned_char_list =
tl_append<scalar_unsigned_char_list, vector_unsigned_char_list,
marray_unsigned_char_list>;

using scalar_char_list =
tl_append<scalar_default_char_list, scalar_signed_char_list,
scalar_unsigned_char_list>;

using vector_char_list =
tl_append<vector_default_char_list, vector_signed_char_list,
vector_unsigned_char_list>;

using marray_char_list =
tl_append<marray_default_char_list, marray_signed_char_list,
marray_unsigned_char_list>;

using char_list = tl_append<scalar_char_list, vector_char_list>;

// short int types
using scalar_signed_short_list = type_list<signed short>;

Expand All @@ -244,10 +169,6 @@ using marray_signed_short_list =
marray<signed short, 3>, marray<signed short, 4>,
marray<signed short, 8>, marray<signed short, 16>>;

using signed_short_list =
tl_append<scalar_signed_short_list, vector_signed_short_list,
marray_signed_short_list>;

using scalar_unsigned_short_list = type_list<unsigned short>;

using vector_unsigned_short_list =
Expand Down Expand Up @@ -571,29 +492,13 @@ using signed_basic_list =

using scalar_unsigned_basic_list = tl_append<scalar_unsigned_integer_list>;

using vector_unsigned_basic_list = tl_append<vector_unsigned_integer_list>;

using marray_unsigned_basic_list = tl_append<marray_unsigned_integer_list>;

using unsigned_basic_list =
tl_append<scalar_unsigned_basic_list, vector_unsigned_basic_list,
marray_unsigned_basic_list>;

using scalar_basic_list =
tl_append<scalar_signed_basic_list, scalar_unsigned_basic_list>;
tl_append<scalar_unsigned_basic_list, vector_unsigned_integer_list,
marray_unsigned_integer_list>;

using vector_basic_list =
tl_append<vector_signed_basic_list, vector_unsigned_basic_list>;

using marray_basic_list =
tl_append<marray_signed_basic_list, marray_unsigned_basic_list>;

using basic_list =
tl_append<scalar_basic_list, vector_basic_list, marray_basic_list>;
tl_append<vector_signed_basic_list, vector_unsigned_integer_list>;

// nan builtin types
using nan_list = tl_append<gtl::unsigned_short_list, gtl::unsigned_int_list,
gtl::unsigned_long_integer_list>;
} // namespace gtl
namespace gvl {
// address spaces
Expand Down
163 changes: 0 additions & 163 deletions sycl/include/sycl/detail/generic_type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,73 +65,6 @@ template <typename T>
inline constexpr bool is_svgenfloat_v =
is_contained_v<T, gtl::scalar_vector_floating_list>;

template <typename T>
inline constexpr bool is_mgenfloat_v =
is_marray_v<T> && is_svgenfloat_v<get_elem_type_t<T>>;

template <typename T>
inline constexpr bool is_gengeofloat_v = is_contained_v<T, gtl::geo_float_list>;

template <typename T>
inline constexpr bool is_gengeodouble_v =
is_contained_v<T, gtl::geo_double_list>;

template <typename T>
inline constexpr bool is_gengeomarrayfloat_v =
is_contained_v<T, gtl::marray_geo_float_list>;

template <typename T>
inline constexpr bool is_gengeomarray_v =
is_contained_v<T, gtl::marray_geo_list>;

template <typename T>
inline constexpr bool is_gengeohalf_v = is_contained_v<T, gtl::geo_half_list>;

template <typename T>
inline constexpr bool is_vgengeofloat_v =
is_contained_v<T, gtl::vector_geo_float_list>;

template <typename T>
inline constexpr bool is_vgengeodouble_v =
is_contained_v<T, gtl::vector_geo_double_list>;

template <typename T>
inline constexpr bool is_vgengeohalf_v =
is_contained_v<T, gtl::vector_geo_half_list>;

template <typename T>
inline constexpr bool is_sgengeo_v = is_contained_v<T, gtl::scalar_geo_list>;

template <typename T>
inline constexpr bool is_vgengeo_v = is_contained_v<T, gtl::vector_geo_list>;

template <typename T>
inline constexpr bool is_gencrossfloat_v =
is_contained_v<T, gtl::cross_float_list>;

template <typename T>
inline constexpr bool is_gencrossdouble_v =
is_contained_v<T, gtl::cross_double_list>;

template <typename T>
inline constexpr bool is_gencrosshalf_v =
is_contained_v<T, gtl::cross_half_list>;

template <typename T>
inline constexpr bool is_gencross_v =
is_contained_v<T, gtl::cross_floating_list>;

template <typename T>
inline constexpr bool is_gencrossmarray_v =
is_contained_v<T, gtl::cross_marray_list>;

template <typename T>
inline constexpr bool is_ugenint_v = is_contained_v<T, gtl::unsigned_int_list>;

template <typename T>
inline constexpr bool is_intn_v =
is_contained_v<T, gtl::vector_signed_int_list>;

template <typename T>
inline constexpr bool is_genint_v = is_contained_v<T, gtl::signed_int_list>;

Expand All @@ -141,28 +74,10 @@ inline constexpr bool is_geninteger_v = is_contained_v<T, gtl::integer_list>;
template <typename T>
using is_geninteger = std::bool_constant<is_geninteger_v<T>>;

template <typename T>
inline constexpr bool is_igeninteger_v =
is_contained_v<T, gtl::signed_integer_list>;

template <typename T>
using is_igeninteger = std::bool_constant<is_igeninteger_v<T>>;

template <typename T>
inline constexpr bool is_ugeninteger_v =
is_contained_v<T, gtl::unsigned_integer_list>;

template <typename T>
using is_ugeninteger = std::bool_constant<is_ugeninteger_v<T>>;

template <typename T>
inline constexpr bool is_sgeninteger_v =
is_contained_v<T, gtl::scalar_integer_list>;

template <typename T>
inline constexpr bool is_vgeninteger_v =
is_contained_v<T, gtl::vector_integer_list>;

template <typename T>
inline constexpr bool is_sigeninteger_v =
is_contained_v<T, gtl::scalar_signed_integer_list>;
Expand All @@ -171,87 +86,9 @@ template <typename T>
inline constexpr bool is_sugeninteger_v =
is_contained_v<T, gtl::scalar_unsigned_integer_list>;

template <typename T>
inline constexpr bool is_vigeninteger_v =
is_contained_v<T, gtl::vector_signed_integer_list>;

template <typename T>
inline constexpr bool is_vugeninteger_v =
is_contained_v<T, gtl::vector_unsigned_integer_list>;

template <typename T>
inline constexpr bool is_genbool_v = is_contained_v<T, gtl::bool_list>;

template <typename T>
inline constexpr bool is_gentype_v = is_contained_v<T, gtl::basic_list>;

template <typename T>
inline constexpr bool is_vgentype_v = is_contained_v<T, gtl::vector_basic_list>;

template <typename T>
inline constexpr bool is_sgentype_v = is_contained_v<T, gtl::scalar_basic_list>;

template <typename T>
inline constexpr bool is_igeninteger8bit_v =
is_gen_based_on_type_sizeof_v<T, 1, is_igeninteger>;

template <typename T>
inline constexpr bool is_igeninteger16bit_v =
is_gen_based_on_type_sizeof_v<T, 2, is_igeninteger>;

template <typename T>
inline constexpr bool is_igeninteger32bit_v =
is_gen_based_on_type_sizeof_v<T, 4, is_igeninteger>;

template <typename T>
inline constexpr bool is_igeninteger64bit_v =
is_gen_based_on_type_sizeof_v<T, 8, is_igeninteger>;

template <typename T>
inline constexpr bool is_ugeninteger8bit_v =
is_gen_based_on_type_sizeof_v<T, 1, is_ugeninteger>;

template <typename T>
inline constexpr bool is_ugeninteger16bit_v =
is_gen_based_on_type_sizeof_v<T, 2, is_ugeninteger>;

template <typename T>
inline constexpr bool is_ugeninteger32bit_v =
is_gen_based_on_type_sizeof_v<T, 4, is_ugeninteger>;

template <typename T>
inline constexpr bool is_ugeninteger64bit_v =
is_gen_based_on_type_sizeof_v<T, 8, is_ugeninteger>;

template <typename T>
inline constexpr bool is_genintptr_v =
is_pointer_v<T> && is_genint_v<remove_pointer_t<T>> &&
is_address_space_compliant_v<T, gvl::nonconst_address_space_list>;

template <typename T, access::address_space AddressSpace,
access::decorated IsDecorated>
inline constexpr bool is_genintptr_marray_v =
std::is_same_v<T, sycl::marray<marray_element_t<T>, T::size()>> &&
is_genint_v<marray_element_t<remove_pointer_t<T>>> &&
is_address_space_compliant_v<multi_ptr<T, AddressSpace, IsDecorated>,
gvl::nonconst_address_space_list> &&
(IsDecorated == access::decorated::yes ||
IsDecorated == access::decorated::no);

template <typename T>
inline constexpr bool is_genfloatptr_v =
is_pointer_v<T> && is_genfloat_v<remove_pointer_t<T>> &&
is_address_space_compliant_v<T, gvl::nonconst_address_space_list>;

template <typename T, access::address_space AddressSpace,
access::decorated IsDecorated>
inline constexpr bool is_genfloatptr_marray_v =
is_mgenfloat_v<T> &&
is_address_space_compliant_v<multi_ptr<T, AddressSpace, IsDecorated>,
gvl::nonconst_address_space_list> &&
(IsDecorated == access::decorated::yes ||
IsDecorated == access::decorated::no);

template <typename T>
using is_byte = typename
#if (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0)
Expand Down
Loading
Loading