Skip to content

Commit b36cdd1

Browse files
[NFC][SYCL] Drop unused is_<type class>_v traits (#12739)
1 parent 8293a5c commit b36cdd1

File tree

2 files changed

+0
-133
lines changed

2 files changed

+0
-133
lines changed

sycl/include/sycl/detail/generic_type_traits.hpp

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,14 @@ inline namespace _V1 {
2727
namespace detail {
2828
template <int N> struct Boolean;
2929

30-
template <typename T>
31-
inline constexpr bool is_floatn_v = is_contained_v<T, gtl::vector_float_list>;
32-
33-
template <typename T>
34-
inline constexpr bool is_genfloatf_v = is_contained_v<T, gtl::float_list>;
35-
3630
template <typename T>
3731
inline constexpr bool is_svgenfloatf_v =
3832
is_contained_v<T, gtl::scalar_vector_float_list>;
3933

40-
template <typename T>
41-
inline constexpr bool is_doublen_v = is_contained_v<T, gtl::vector_double_list>;
42-
43-
template <typename T>
44-
inline constexpr bool is_genfloatd_v = is_contained_v<T, gtl::double_list>;
45-
4634
template <typename T>
4735
inline constexpr bool is_svgenfloatd_v =
4836
is_contained_v<T, gtl::scalar_vector_double_list>;
4937

50-
template <typename T>
51-
inline constexpr bool is_halfn_v = is_contained_v<T, gtl::vector_half_list>;
52-
53-
template <typename T>
54-
inline constexpr bool is_genfloath_v = is_contained_v<T, gtl::half_list>;
55-
5638
template <typename T>
5739
inline constexpr bool is_half_v = is_contained_v<T, gtl::scalar_half_list>;
5840

@@ -143,47 +125,6 @@ template <typename T>
143125
inline constexpr bool is_gencrossmarray_v =
144126
is_contained_v<T, gtl::cross_marray_list>;
145127

146-
template <typename T>
147-
inline constexpr bool is_charn_v =
148-
is_contained_v<T, gtl::vector_default_char_list>;
149-
150-
template <typename T>
151-
inline constexpr bool is_scharn_v =
152-
is_contained_v<T, gtl::vector_signed_char_list>;
153-
154-
template <typename T>
155-
inline constexpr bool is_ucharn_v =
156-
is_contained_v<T, gtl::vector_unsigned_char_list>;
157-
158-
template <typename T>
159-
inline constexpr bool is_igenchar_v = is_contained_v<T, gtl::signed_char_list>;
160-
161-
template <typename T>
162-
inline constexpr bool is_ugenchar_v =
163-
is_contained_v<T, gtl::unsigned_char_list>;
164-
165-
template <typename T>
166-
inline constexpr bool is_genchar_v = is_contained_v<T, gtl::char_list>;
167-
168-
template <typename T>
169-
inline constexpr bool is_shortn_v =
170-
is_contained_v<T, gtl::vector_signed_short_list>;
171-
172-
template <typename T>
173-
inline constexpr bool is_genshort_v = is_contained_v<T, gtl::signed_short_list>;
174-
175-
template <typename T>
176-
inline constexpr bool is_ushortn_v =
177-
is_contained_v<T, gtl::vector_unsigned_short_list>;
178-
179-
template <typename T>
180-
inline constexpr bool is_ugenshort_v =
181-
is_contained_v<T, gtl::unsigned_short_list>;
182-
183-
template <typename T>
184-
inline constexpr bool is_uintn_v =
185-
is_contained_v<T, gtl::vector_unsigned_int_list>;
186-
187128
template <typename T>
188129
inline constexpr bool is_ugenint_v = is_contained_v<T, gtl::unsigned_int_list>;
189130

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

197-
template <typename T>
198-
inline constexpr bool is_ulonglongn_v =
199-
is_contained_v<T, gtl::vector_unsigned_longlong_list>;
200-
201-
template <typename T>
202-
inline constexpr bool is_ugenlonglong_v =
203-
is_contained_v<T, gtl::unsigned_longlong_list>;
204-
205-
template <typename T>
206-
inline constexpr bool is_longlongn_v =
207-
is_contained_v<T, gtl::vector_signed_longlong_list>;
208-
209-
template <typename T>
210-
inline constexpr bool is_genlonglong_v =
211-
is_contained_v<T, gtl::signed_longlong_list>;
212-
213-
template <typename T>
214-
inline constexpr bool is_igenlonginteger_v =
215-
is_contained_v<T, gtl::signed_long_integer_list>;
216-
217-
template <typename T>
218-
inline constexpr bool is_ugenlonginteger_v =
219-
is_contained_v<T, gtl::unsigned_long_integer_list>;
220-
221138
template <typename T>
222139
inline constexpr bool is_geninteger_v = is_contained_v<T, gtl::integer_list>;
223140

@@ -306,22 +223,6 @@ template <typename T>
306223
inline constexpr bool is_ugeninteger64bit_v =
307224
is_gen_based_on_type_sizeof_v<T, 8, is_ugeninteger>;
308225

309-
template <typename T>
310-
inline constexpr bool is_geninteger8bit_v =
311-
is_gen_based_on_type_sizeof_v<T, 1, is_geninteger>;
312-
313-
template <typename T>
314-
inline constexpr bool is_geninteger16bit_v =
315-
is_gen_based_on_type_sizeof_v<T, 2, is_geninteger>;
316-
317-
template <typename T>
318-
inline constexpr bool is_geninteger32bit_v =
319-
is_gen_based_on_type_sizeof_v<T, 4, is_geninteger>;
320-
321-
template <typename T>
322-
inline constexpr bool is_geninteger64bit_v =
323-
is_gen_based_on_type_sizeof_v<T, 8, is_geninteger>;
324-
325226
template <typename T>
326227
inline constexpr bool is_genintptr_v =
327228
is_pointer_v<T> && is_genint_v<remove_pointer_t<T>> &&
@@ -351,11 +252,6 @@ inline constexpr bool is_genfloatptr_marray_v =
351252
(IsDecorated == access::decorated::yes ||
352253
IsDecorated == access::decorated::no);
353254

354-
template <typename T>
355-
inline constexpr bool is_genptr_v =
356-
is_pointer_v<T> && is_gentype_v<remove_pointer_t<T>> &&
357-
is_address_space_compliant_v<T, gvl::nonconst_address_space_list>;
358-
359255
template <typename T>
360256
inline constexpr bool is_nan_type_v = is_contained_v<T, gtl::nan_list>;
361257

sycl/test/basic_tests/generic_type_traits.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,6 @@ using d_t = double;
2020
struct v {};
2121

2222
int main() {
23-
// is_floatn
24-
static_assert(d::is_floatn_v<s::vec<s::opencl::cl_float, 4>> == true);
25-
static_assert(d::is_floatn_v<s::vec<s::opencl::cl_float, 16>> == true);
26-
static_assert(d::is_floatn_v<s::float4> == true, "");
27-
static_assert(d::is_floatn_v<s::float16> == true, "");
28-
29-
static_assert(d::is_floatn_v<s::opencl::cl_float> == false);
30-
static_assert(d::is_floatn_v<s::opencl::cl_int> == false);
31-
static_assert(d::is_floatn_v<i_t> == false, "");
32-
static_assert(d::is_floatn_v<f_t> == false, "");
33-
static_assert(d::is_floatn_v<t::c_t> == false, "");
34-
static_assert(d::is_floatn_v<t::d_t> == false, "");
35-
static_assert(d::is_floatn_v<v> == false, "");
36-
// is_genfloatf
37-
static_assert(d::is_genfloatf_v<s::vec<s::opencl::cl_float, 4>> == true);
38-
static_assert(d::is_genfloatf_v<s::vec<s::opencl::cl_float, 16>> == true);
39-
static_assert(d::is_genfloatf_v<s::opencl::cl_float> == true);
40-
static_assert(d::is_genfloatf_v<s::float4> == true);
41-
static_assert(d::is_genfloatf_v<s::float16> == true);
42-
static_assert(d::is_genfloatf_v<f_t> == true, "");
43-
44-
static_assert(d::is_genfloatf_v<s::opencl::cl_int> == false);
45-
static_assert(d::is_genfloatf_v<i_t> == false, "");
46-
static_assert(d::is_genfloatf_v<t::c_t> == false, "");
47-
static_assert(d::is_genfloatf_v<t::d_t> == false, "");
48-
static_assert(d::is_genfloatf_v<v> == false, "");
49-
50-
//
51-
5223
static_assert(d::is_genfloat_v<s::opencl::cl_float> == true);
5324
static_assert(d::is_genfloat_v<s::vec<s::opencl::cl_float, 4>> == true);
5425

0 commit comments

Comments
 (0)