File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
sycl/include/CL/sycl/detail Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -429,13 +429,23 @@ struct select_cl_vector_or_scalar<
429
429
template <typename T, typename Enable = void >
430
430
struct select_cl_mptr_or_vector_or_scalar ;
431
431
432
+ // this struct helps to use std::uint8_t instead of std::byte,
433
+ // which is not supported on device
434
+ template <typename T> struct TypeHelper { using RetType = T; };
435
+
436
+ #if __cplusplus >= 201703L
437
+ template <> struct TypeHelper <std::byte> { using RetType = std::uint8_t ; };
438
+ #endif
439
+
440
+ template <typename T> using type_helper = typename TypeHelper<T>::RetType;
441
+
432
442
template <typename T>
433
443
struct select_cl_mptr_or_vector_or_scalar <
434
444
T, typename detail::enable_if_t <is_genptr<T>::value &&
435
445
!std::is_pointer<T>::value>> {
436
- using type = multi_ptr<
437
- typename select_cl_vector_or_scalar <typename T::element_type>::type,
438
- T::address_space>;
446
+ using type = multi_ptr<typename select_cl_vector_or_scalar<
447
+ type_helper <typename T::element_type> >::type,
448
+ T::address_space>;
439
449
};
440
450
441
451
template <typename T>
You can’t perform that action at this time.
0 commit comments