@@ -184,80 +184,35 @@ template <typename T, typename R> struct copy_cv_qualifiers {
184
184
};
185
185
186
186
// make_signed with support SYCL vec class
187
- template <typename T, typename Enable = void > struct make_signed_impl ;
188
-
189
- template <typename T>
190
- using make_signed_impl_t = typename make_signed_impl<T, T>::type;
191
-
192
- template <typename T>
193
- struct make_signed_impl <
194
- T, std::enable_if_t <is_contained<T, gtl::scalar_integer_list>::value, T>> {
187
+ template <typename T> struct make_signed {
195
188
using type = std::make_signed_t <T>;
196
189
};
197
-
198
- template <typename T>
199
- struct make_signed_impl <
200
- T, std::enable_if_t <is_contained<T, gtl::vector_integer_list>::value, T>> {
201
- using base_type = make_signed_impl_t <vector_element_t <T>>;
202
- using type = change_base_type_t <T, base_type>;
190
+ template <typename T> using make_signed_t = typename make_signed<T>::type;
191
+ template <class T > struct make_signed <const T> {
192
+ using type = const make_signed_t <T>;
203
193
};
204
-
205
- // TODO Delete this specialization after solving the problems in the test
206
- // infrastructure.
207
- template <typename T>
208
- struct make_signed_impl <
209
- T, std::enable_if_t <!is_contained<T, gtl::integer_list>::value, T>> {
210
- using type = T;
194
+ template <class T , int N> struct make_signed <vec<T, N>> {
195
+ using type = vec<make_signed_t <T>, N>;
211
196
};
212
-
213
- template <typename T> struct make_signed {
214
- using new_type_wo_cv_qualifiers = make_signed_impl_t <std::remove_cv_t <T>>;
215
- using type = copy_cv_qualifiers_t <T, new_type_wo_cv_qualifiers>;
197
+ template <class T , std::size_t N> struct make_signed <marray<T, N>> {
198
+ using type = marray<make_signed_t <T>, N>;
216
199
};
217
200
218
- template <typename T> using make_signed_t = typename make_signed<T>::type;
219
-
220
201
// make_unsigned with support SYCL vec class
221
- template <typename T, typename Enable = void > struct make_unsigned_impl ;
222
-
223
- template <typename T>
224
- using make_unsigned_impl_t = typename make_unsigned_impl<T, T>::type;
225
-
226
- template <typename T>
227
- struct make_unsigned_impl <
228
- T, std::enable_if_t <is_contained<T, gtl::scalar_integer_list>::value, T>> {
202
+ template <typename T> struct make_unsigned {
229
203
using type = std::make_unsigned_t <T>;
230
204
};
231
-
232
- template <typename T>
233
- struct make_unsigned_impl <
234
- T, std::enable_if_t <is_contained<T, gtl::vector_integer_list>::value, T>> {
235
- using base_type = make_unsigned_impl_t <vector_element_t <T>>;
236
- using type = change_base_type_t <T, base_type>;
237
- };
238
-
239
- // TODO Delete this specialization after solving the problems in the test
240
- // infrastructure.
241
- template <typename T>
242
- struct make_unsigned_impl <
243
- T, std::enable_if_t <!is_contained<T, gtl::integer_list>::value, T>> {
244
- using type = T;
205
+ template <typename T> using make_unsigned_t = typename make_unsigned<T>::type;
206
+ template <class T > struct make_unsigned <const T> {
207
+ using type = const make_unsigned_t <T>;
245
208
};
246
-
247
- template <typename T> struct make_unsigned {
248
- using new_type_wo_cv_qualifiers = make_unsigned_impl_t <std::remove_cv_t <T>>;
249
- using type = copy_cv_qualifiers_t <T, new_type_wo_cv_qualifiers>;
209
+ template <class T , int N> struct make_unsigned <vec<T, N>> {
210
+ using type = vec<make_unsigned_t <T>, N>;
250
211
};
251
-
252
- template <typename T, size_t N> struct make_unsigned <marray<T, N>> {
253
- using base_type = marray_element_t <marray<T, N>>;
254
- using new_type_wo_cv_qualifiers =
255
- make_unsigned_impl_t <std::remove_cv_t <base_type>>;
256
- using type = marray<copy_cv_qualifiers_t <T, new_type_wo_cv_qualifiers>, N>;
212
+ template <class T , std::size_t N> struct make_unsigned <marray<T, N>> {
213
+ using type = marray<make_unsigned_t <T>, N>;
257
214
};
258
215
259
- template <typename T> using make_unsigned_t = typename make_unsigned<T>::type;
260
-
261
216
// Checks that sizeof base type of T equal N and T satisfies S<T>::value
262
217
template <typename T, int N, template <typename > class S >
263
218
using is_gen_based_on_type_sizeof =
0 commit comments