17 inline namespace _V1 {
19 template <
typename>
struct is_swizzle : std::false_type {};
20 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
21 template <
typename>
class OperationCurrentT,
int... Indexes>
23 OperationCurrentT, Indexes...>> : std::true_type {};
31 template <
typename T,
size_t N,
typename... Ts>
33 : std::bool_constant<check_type_in_v<T, Ts...>> {};
34 template <
typename T,
int N,
typename... Ts>
36 : std::bool_constant<check_type_in_v<T, Ts...>> {};
37 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
38 template <
typename>
class OperationCurrentT,
int... Indexes,
41 OperationCurrentT, Indexes...>,
43 : std::bool_constant<check_type_in_v<typename VecT::element_type, Ts...>> {
48 : std::bool_constant<check_type_in_v<ElementType, Ts...>> {};
53 template <
typename T,
size_t N>
55 template <
typename T,
int N>
57 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
58 template <
typename>
class OperationCurrentT,
int... Indexes>
60 OperationCurrentT, Indexes...>>
61 : std::integral_constant<size_t, sizeof...(Indexes)> {};
64 template <
typename T,
size_t... Ns>
66 : std::bool_constant<check_size_in_v<num_elements<T>::value, Ns...>> {};
68 template <
typename T,
int... Ns>
73 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
74 template <
typename>
class OperationCurrentT,
int... Indexes>
76 OperationCurrentT, Indexes...>> {
77 using type =
vec<
typename VecT::element_type,
sizeof...(Indexes)>;
80 template <
typename T1,
typename T2>
83 std::enable_if_t<is_vec_or_swizzle_v<T1> && is_vec_or_swizzle_v<T2>>>
84 : std::is_same<simplify_if_swizzle_t<T1>, simplify_if_swizzle_t<T2>> {};
92 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
93 template <
typename>
class OperationCurrentT,
int... Indexes>
95 OperationCurrentT, Indexes...>> {
108 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
109 template <
typename>
class OperationCurrentT,
int... Indexes>
111 OperationCurrentT, Indexes...>> {
123 template <
typename NewElemT,
typename T,
size_t N>
127 template <
typename NewElemT,
typename T,
int N>
131 template <
typename NewElemT,
typename VecT,
typename OperationLeftT,
132 typename OperationRightT,
template <
typename>
class OperationCurrentT,
135 SwizzleOp<VecT, OperationLeftT, OperationRightT,
136 OperationCurrentT, Indexes...>> {
143 template <
typename NewElemT,
typename T>
148 return {X[Start], X[Start + 1]};
152 for (
size_t I = 0; I < N; I++)
158 for (
size_t I = 0; I < N; I++)
Provides a cross-platform math array class template that works on SYCL devices as well as in host C++...
class sycl::vec ///////////////////////// Provides a cross-patform vector class template that works e...
constexpr bool is_vec_or_swizzle_v
marray< T, N > to_marray(vec< T, N > X)
constexpr bool is_valid_size_v
typename change_elements< NewElemT, T >::type change_elements_t
vec< T, N > to_vec(marray< T, N > X)
vec< T, 2 > to_vec2(marray< T, N > X, size_t Start)
constexpr bool is_swizzle_v