Stratax 0.4.0rc1
Loading...
Searching...
No Matches
ArrayTraits.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#include <type_traits>
7
11
12namespace stratax::core {
13
24template<typename A, typename T>
26
30template<typename From, typename To>
31struct RebindArray<container::Vector<From>, To>
32{
35};
36
40template<typename From, typename To>
41struct RebindArray<container::Matrix<From>, To>
42{
45};
46
50template<typename From, typename To>
51struct RebindArray<container::Tensor<From>, To>
52{
55};
56
63template<typename A, typename T>
65 typename RebindArray<
66 std::remove_cvref_t<A>,
67 std::remove_cvref_t<T>
68 >::type;
69
77template<typename L, typename R, typename T>
79
83template<typename LValue, typename RValue, typename T>
85 container::Vector<LValue>,
86 container::Vector<RValue>,
87 T>
88{
91};
92
96template<typename LValue, typename RValue, typename T>
98 container::Matrix<LValue>,
99 container::Matrix<RValue>,
100 T>
101{
104};
105
109template<typename LValue, typename RValue, typename T>
111 container::Tensor<LValue>,
112 container::Tensor<RValue>,
113 T>
114{
117};
118
122template<typename LValue, typename RValue, typename T>
124 container::Vector<LValue>,
125 container::Matrix<RValue>,
126 T>
127{
130};
131
133template<typename LValue, typename RValue, typename T>
135 container::Matrix<LValue>,
136 container::Vector<RValue>,
137 T>
138{
141};
142
146template<typename LValue, typename RValue, typename T>
148 container::Vector<LValue>,
149 container::Tensor<RValue>,
150 T>
151{
154};
155
157template<typename LValue, typename RValue, typename T>
159 container::Tensor<LValue>,
160 container::Vector<RValue>,
161 T>
162{
165};
166
170template<typename LValue, typename RValue, typename T>
172 container::Matrix<LValue>,
173 container::Tensor<RValue>,
174 T>
175{
178};
179
181template<typename LValue, typename RValue, typename T>
183 container::Tensor<LValue>,
184 container::Matrix<RValue>,
185 T>
186{
189};
190
194template<typename L, typename R, typename T>
196 typename PromoteArray<
197 std::remove_cvref_t<L>,
198 std::remove_cvref_t<R>,
199 std::remove_cvref_t<T>
200 >::type;
201
202} // namespace stratax::core
typename PromoteArray< std::remove_cvref_t< L >, std::remove_cvref_t< R >, std::remove_cvref_t< T > >::type promote_array_t
Convenience alias for the promoted array container type.
typename RebindArray< std::remove_cvref_t< A >, std::remove_cvref_t< T > >::type rebind_array_t
Convenience alias for rebinding an array to a new value type.
Rank-two owning arrays.
Arbitrary-rank owning arrays; rank zero is empty.
Rank-one owning arrays.
Two-dimensional owning array of supported dtype values.
Definition Matrix.hpp:49
Arbitrary-rank owning array of supported dtype values.
Definition Tensor.hpp:54
One-dimensional owning array of supported dtype values.
Definition Vector.hpp:47
Determines the result container family for two Stratax arrays.
Rebinds a Stratax array container to a different value type.