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

[NFC][SYCL] Drop unused is_<type class>_v traits #12739

Merged
merged 1 commit into from
Feb 20, 2024
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
104 changes: 0 additions & 104 deletions sycl/include/sycl/detail/generic_type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,14 @@ inline namespace _V1 {
namespace detail {
template <int N> struct Boolean;

template <typename T>
inline constexpr bool is_floatn_v = is_contained_v<T, gtl::vector_float_list>;

template <typename T>
inline constexpr bool is_genfloatf_v = is_contained_v<T, gtl::float_list>;

template <typename T>
inline constexpr bool is_svgenfloatf_v =
is_contained_v<T, gtl::scalar_vector_float_list>;

template <typename T>
inline constexpr bool is_doublen_v = is_contained_v<T, gtl::vector_double_list>;

template <typename T>
inline constexpr bool is_genfloatd_v = is_contained_v<T, gtl::double_list>;

template <typename T>
inline constexpr bool is_svgenfloatd_v =
is_contained_v<T, gtl::scalar_vector_double_list>;

template <typename T>
inline constexpr bool is_halfn_v = is_contained_v<T, gtl::vector_half_list>;

template <typename T>
inline constexpr bool is_genfloath_v = is_contained_v<T, gtl::half_list>;

template <typename T>
inline constexpr bool is_half_v = is_contained_v<T, gtl::scalar_half_list>;

Expand Down Expand Up @@ -143,47 +125,6 @@ template <typename T>
inline constexpr bool is_gencrossmarray_v =
is_contained_v<T, gtl::cross_marray_list>;

template <typename T>
inline constexpr bool is_charn_v =
is_contained_v<T, gtl::vector_default_char_list>;

template <typename T>
inline constexpr bool is_scharn_v =
is_contained_v<T, gtl::vector_signed_char_list>;

template <typename T>
inline constexpr bool is_ucharn_v =
is_contained_v<T, gtl::vector_unsigned_char_list>;

template <typename T>
inline constexpr bool is_igenchar_v = is_contained_v<T, gtl::signed_char_list>;

template <typename T>
inline constexpr bool is_ugenchar_v =
is_contained_v<T, gtl::unsigned_char_list>;

template <typename T>
inline constexpr bool is_genchar_v = is_contained_v<T, gtl::char_list>;

template <typename T>
inline constexpr bool is_shortn_v =
is_contained_v<T, gtl::vector_signed_short_list>;

template <typename T>
inline constexpr bool is_genshort_v = is_contained_v<T, gtl::signed_short_list>;

template <typename T>
inline constexpr bool is_ushortn_v =
is_contained_v<T, gtl::vector_unsigned_short_list>;

template <typename T>
inline constexpr bool is_ugenshort_v =
is_contained_v<T, gtl::unsigned_short_list>;

template <typename T>
inline constexpr bool is_uintn_v =
is_contained_v<T, gtl::vector_unsigned_int_list>;

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

Expand All @@ -194,30 +135,6 @@ inline constexpr bool is_intn_v =
template <typename T>
inline constexpr bool is_genint_v = is_contained_v<T, gtl::signed_int_list>;

template <typename T>
inline constexpr bool is_ulonglongn_v =
is_contained_v<T, gtl::vector_unsigned_longlong_list>;

template <typename T>
inline constexpr bool is_ugenlonglong_v =
is_contained_v<T, gtl::unsigned_longlong_list>;

template <typename T>
inline constexpr bool is_longlongn_v =
is_contained_v<T, gtl::vector_signed_longlong_list>;

template <typename T>
inline constexpr bool is_genlonglong_v =
is_contained_v<T, gtl::signed_longlong_list>;

template <typename T>
inline constexpr bool is_igenlonginteger_v =
is_contained_v<T, gtl::signed_long_integer_list>;

template <typename T>
inline constexpr bool is_ugenlonginteger_v =
is_contained_v<T, gtl::unsigned_long_integer_list>;

template <typename T>
inline constexpr bool is_geninteger_v = is_contained_v<T, gtl::integer_list>;

Expand Down Expand Up @@ -306,22 +223,6 @@ 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_geninteger8bit_v =
is_gen_based_on_type_sizeof_v<T, 1, is_geninteger>;

template <typename T>
inline constexpr bool is_geninteger16bit_v =
is_gen_based_on_type_sizeof_v<T, 2, is_geninteger>;

template <typename T>
inline constexpr bool is_geninteger32bit_v =
is_gen_based_on_type_sizeof_v<T, 4, is_geninteger>;

template <typename T>
inline constexpr bool is_geninteger64bit_v =
is_gen_based_on_type_sizeof_v<T, 8, is_geninteger>;

template <typename T>
inline constexpr bool is_genintptr_v =
is_pointer_v<T> && is_genint_v<remove_pointer_t<T>> &&
Expand Down Expand Up @@ -351,11 +252,6 @@ inline constexpr bool is_genfloatptr_marray_v =
(IsDecorated == access::decorated::yes ||
IsDecorated == access::decorated::no);

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

template <typename T>
inline constexpr bool is_nan_type_v = is_contained_v<T, gtl::nan_list>;

Expand Down
29 changes: 0 additions & 29 deletions sycl/test/basic_tests/generic_type_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,6 @@ using d_t = double;
struct v {};

int main() {
// is_floatn
static_assert(d::is_floatn_v<s::vec<s::opencl::cl_float, 4>> == true);
static_assert(d::is_floatn_v<s::vec<s::opencl::cl_float, 16>> == true);
static_assert(d::is_floatn_v<s::float4> == true, "");
static_assert(d::is_floatn_v<s::float16> == true, "");

static_assert(d::is_floatn_v<s::opencl::cl_float> == false);
static_assert(d::is_floatn_v<s::opencl::cl_int> == false);
static_assert(d::is_floatn_v<i_t> == false, "");
static_assert(d::is_floatn_v<f_t> == false, "");
static_assert(d::is_floatn_v<t::c_t> == false, "");
static_assert(d::is_floatn_v<t::d_t> == false, "");
static_assert(d::is_floatn_v<v> == false, "");
// is_genfloatf
static_assert(d::is_genfloatf_v<s::vec<s::opencl::cl_float, 4>> == true);
static_assert(d::is_genfloatf_v<s::vec<s::opencl::cl_float, 16>> == true);
static_assert(d::is_genfloatf_v<s::opencl::cl_float> == true);
static_assert(d::is_genfloatf_v<s::float4> == true);
static_assert(d::is_genfloatf_v<s::float16> == true);
static_assert(d::is_genfloatf_v<f_t> == true, "");

static_assert(d::is_genfloatf_v<s::opencl::cl_int> == false);
static_assert(d::is_genfloatf_v<i_t> == false, "");
static_assert(d::is_genfloatf_v<t::c_t> == false, "");
static_assert(d::is_genfloatf_v<t::d_t> == false, "");
static_assert(d::is_genfloatf_v<v> == false, "");

//

static_assert(d::is_genfloat_v<s::opencl::cl_float> == true);
static_assert(d::is_genfloat_v<s::vec<s::opencl::cl_float, 4>> == true);

Expand Down
Loading