18 #include <type_traits>
21 inline namespace _V1 {
28 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
29 template <
typename>
class OperationCurrentT,
int... Indexes>
33 template <
int Dimensions>
class group;
35 namespace ext::oneapi {
38 namespace experimental {
39 template <
typename Group, std::
size_t Extent>
class group_with_scratchpad;
48 template <
int Dimensions>
51 template <
int Dimensions>
68 template <
typename Group, std::
size_t Extent>
77 template <
typename T>
struct is_group : std::false_type {};
79 template <
int Dimensions>
84 template <>
struct is_sub_group<ext::oneapi::sub_group> : std::true_type {};
89 : std::bool_constant<is_group<T>::value || is_sub_group<T>::value> {};
105 struct is_group : std::bool_constant<detail::is_group<T>::value ||
106 detail::is_sub_group<T>::value> {};
110 namespace ext::oneapi::experimental {
124 template <
typename T,
typename R>
131 template <
typename T,
int N>
133 template <
typename T>
139 template <
typename T>
167 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
168 template <
typename>
class OperationCurrentT,
int... Indexes>
170 OperationCurrentT, Indexes...>> {
184 template <
typename T,
typename =
void>
187 template <
typename T>
189 T,
std::void_t<decltype(__builtin_reduce_max(std::declval<T>()))>>
192 template <
typename T>
195 template <
typename T>
197 using type = decltype(__builtin_reduce_max(std::declval<T>()));
200 template <
typename T>
214 template <
typename T,
typename B>
226 template <
typename T,
typename R>
231 template <
typename T,
typename R>
242 using type = std::make_signed_t<T>;
251 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
252 template <
typename>
class OperationCurrentT,
int... Indexes>
254 OperationCurrentT, Indexes...>> {
263 using type = std::make_unsigned_t<T>;
272 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
273 template <
typename>
class OperationCurrentT,
int... Indexes>
275 OperationCurrentT, Indexes...>> {
283 template <
typename T,
int N,
template <
typename>
class S>
287 template <
typename>
struct is_vec : std::false_type {};
288 template <
typename T,
int N>
struct is_vec<
sycl::
vec<T, N>> : std::true_type {};
302 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
303 template <
typename>
class OperationCurrentT,
int... Indexes>
305 OperationCurrentT, Indexes...>> : std::true_type {};
311 template <
typename T>
315 template <
typename>
struct is_marray : std::false_type {};
316 template <
typename T,
size_t N>
322 template <
typename T>
326 template <
typename T>
331 template <
typename T>
335 template <
typename T>
339 template <
typename T>
341 : std::bool_constant<is_integral<T>::value || is_floating_point<T>::value> {
344 template <
typename T>
346 : std::bool_constant<!is_vec_or_swizzle_v<T> && !is_ext_vector_v<T> &&
347 !is_marray_v<T> && is_arithmetic<T>::value> {};
349 template <
typename T>
352 template <
typename T>
354 : std::bool_constant<(is_vec_or_swizzle_v<T> || is_ext_vector_v<T> ||
356 is_arithmetic<T>::value> {};
359 template <
typename T>
361 : std::bool_constant<std::is_same_v<std::remove_cv_t<T>, bool>> {};
363 template <
typename T>
365 : std::bool_constant<is_vec<T>::value &&
366 is_scalar_bool<vector_element_t<T>>::value> {};
368 template <
typename T>
370 : std::bool_constant<is_scalar_bool<vector_element_t<T>>::value> {};
382 template <
typename T>
401 template <
typename ElementType, access::address_space Space>
403 multi_ptr<ElementType, Space, access::decorated::yes>> : std::true_type {};
405 template <
typename ElementType, access::address_space Space>
407 multi_ptr<ElementType, Space, access::decorated::no>> : std::true_type {};
416 template <
typename ElementType, access::address_space Space>
418 multi_ptr<ElementType, Space, access::decorated::legacy>> : std::true_type {
439 template <
typename T>
445 template <
typename T,
typename SpaceList>
448 template <
typename T,
typename SpaceList>
455 : std::bool_constant<is_one_of_spaces<Space, SpaceList>::value> {};
457 template <
typename T,
typename SpaceList>
461 template <
typename T,
typename SpaceList>
475 template <
typename T,
typename TL>
480 template <
typename T>
482 T,
std::enable_if_t<is_contained<T, gtl::scalar_floating_list>::value, T>> {
486 template <
typename T>
488 T,
std::enable_if_t<is_contained<T, gtl::scalar_signed_integer_list>::value,
493 template <
typename T>
496 is_contained<T, gtl::scalar_unsigned_integer_list>::value, T>> {
504 static constexpr
bool found = !std::is_same_v<upper_type, void>;
505 using type = std::conditional_t<found, new_type, void>;
508 template <
typename T,
size_t N>
513 static constexpr
bool found = !std::is_same_v<upper_type, void>;
514 using type = std::conditional_t<found, new_type, void>;
523 #if defined(RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR)
524 template <access::address_space AS,
class DataT>
526 typename std::conditional<AS == access::address_space::constant_space,
527 const DataT, DataT>::type;
529 template <access::address_space AS,
class DataT>
546 template <
typename T0,
typename... Ts>
547 inline constexpr
bool all_same_v = (... && std::is_same_v<T0, Ts>);
557 template <
typename T,
typename From,
typename To,
typename... Rest>
559 using type = std::conditional_t<std::is_same_v<From, T>, To,
562 template <
typename T,
typename... Ts> constexpr
bool CheckTypeIn() {
563 constexpr
bool SameType[] = {
564 std::is_same_v<std::remove_cv_t<T>, std::remove_cv_t<Ts>>...};
566 for (
size_t I = 0; I <
sizeof...(Ts); ++I)
Provides a cross-platform math array class template that works on SYCL devices as well as in host C++...
constexpr bool check_type_in_v
typename change_base_type< T, B >::type change_base_type_t
constexpr bool is_vec_or_swizzle_v
constexpr bool is_scalar_arithmetic_v
constexpr bool is_pointer_v
typename T::value_type marray_element_t
constexpr bool is_floating_point_v
constexpr bool is_marray_v
constexpr bool is_gen_based_on_type_sizeof_v
constexpr bool is_non_legacy_multi_ptr_v
typename remove_pointer< T >::type remove_pointer_t
typename make_larger< T >::type make_larger_t
typename make_unsigned< T >::type make_unsigned_t
typename vector_element_impl< T >::type vector_element_impl_t
constexpr bool is_address_space_compliant_v
constexpr bool is_ext_vector_v
typename get_elem_type< T >::type get_elem_type_t
constexpr bool all_same_v
constexpr bool is_legacy_multi_ptr_v
constexpr bool CheckTypeIn()
typename vector_element< T >::type vector_element_t
typename copy_cv_qualifiers< T, R >::type copy_cv_qualifiers_t
typename make_signed< T >::type make_signed_t
constexpr bool is_multi_ptr_v
std::array< unsigned char, 16 > uuid_type
find_type_t< TypeList, is_type_size_equal, T > find_same_size_type_t
constexpr bool is_fixed_size_group_v
find_type_t< TypeList, is_type_size_double_of, T > find_twice_as_large_type_t
std::integral_constant< int, V > int_constant
typename make_type_impl< T, TL >::type make_type_t
constexpr bool is_generic_group_v
constexpr bool is_swizzle_v
constexpr bool is_group_helper_v
constexpr bool is_user_constructed_group_v
constexpr bool is_fixed_topology_group_v
class __SYCL_EBO __SYCL_SPECIAL_CLASS Dimensions
constexpr bool is_group_v
sycl::detail::half_impl::half half
typename copy_cv_qualifiers_impl< T, std::remove_cv_t< R > >::type type
std::tuple< Args... > args_type
typename get_elem_type_unqual< std::remove_cv_t< VecT > >::type type
decltype(__builtin_reduce_max(std::declval< T >())) type
static constexpr int size
find_twice_as_large_type_t< gtl::scalar_floating_list, T > type
find_twice_as_large_type_t< gtl::scalar_signed_integer_list, T > type
find_twice_as_large_type_t< gtl::scalar_unsigned_integer_list, T > type
typename make_larger_impl< base_type, base_type >::type upper_type
marray_element_t< marray< T, N > > base_type
std::conditional_t< found, new_type, void > type
typename make_larger_impl< base_type, base_type >::type upper_type
vector_element_t< vec< T, N > > base_type
std::conditional_t< found, new_type, void > type
typename make_larger_impl< T, T >::type type
make_signed_t< std::remove_cv_t< VecT > > type
const make_signed_t< T > type
std::make_signed_t< T > type
typename make_type_impl< T, TL >::type scalar_type
find_same_size_type_t< TL, T > type
make_unsigned_t< std::remove_cv_t< VecT > > type
const make_unsigned_t< T > type
std::make_unsigned_t< T > type
std::conditional_t< std::is_same_v< From, T >, To, typename map_type< T, Rest... >::type > type
copy_cv_qualifiers_t< T, vector_element_impl_t< std::remove_cv_t< T > >> type