18 inline namespace _V1 {
22 template <
typename T,
size_t N,
typename... Ts>
24 : std::bool_constant<check_type_in_v<T, Ts...>> {};
25 template <
typename T,
int N,
typename... Ts>
27 : std::bool_constant<check_type_in_v<T, Ts...>> {};
28 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
29 template <
typename>
class OperationCurrentT,
int... Indexes,
32 OperationCurrentT, Indexes...>,
34 : std::bool_constant<check_type_in_v<typename VecT::element_type, Ts...>> {
39 : std::bool_constant<check_type_in_v<ElementType, Ts...>> {};
40 template <
typename ElementType,
typename... Ts>
47 template <
typename T,
size_t N>
49 template <
typename T,
int N>
51 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
52 template <
typename>
class OperationCurrentT,
int... Indexes>
54 OperationCurrentT, Indexes...>>
55 : std::integral_constant<size_t, sizeof...(Indexes)> {};
58 template <
typename T,
size_t... Ns>
60 : std::bool_constant<check_size_in_v<num_elements<T>::value, Ns...>> {};
62 template <
typename T,
int... Ns>
67 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
68 template <
typename>
class OperationCurrentT,
int... Indexes>
70 OperationCurrentT, Indexes...>> {
71 using type =
vec<
typename VecT::element_type,
sizeof...(Indexes)>;
74 template <
typename T1,
typename T2>
77 std::enable_if_t<is_vec_or_swizzle_v<T1> && is_vec_or_swizzle_v<T2>>>
78 : std::is_same<simplify_if_swizzle_t<T1>, simplify_if_swizzle_t<T2>> {};
86 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
87 template <
typename>
class OperationCurrentT,
int... Indexes>
89 OperationCurrentT, Indexes...>> {
102 template <
typename VecT,
typename OperationLeftT,
typename OperationRightT,
103 template <
typename>
class OperationCurrentT,
int... Indexes>
105 OperationCurrentT, Indexes...>> {
117 template <
typename NewElemT,
typename T,
size_t N>
121 template <
typename NewElemT,
typename T,
int N>
125 template <
typename NewElemT,
typename VecT,
typename OperationLeftT,
126 typename OperationRightT,
template <
typename>
class OperationCurrentT,
129 SwizzleOp<VecT, OperationLeftT, OperationRightT,
130 OperationCurrentT, Indexes...>> {
137 template <
typename NewElemT,
typename T>
142 return {X[Start], X[Start + 1]};
146 for (
size_t I = 0; I < N; I++)
152 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++...
constexpr bool check_type_in_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)