12 #include <Eigen/CXX11/Tensor> 16 template<
int DataLayout>
23 chip1 = tensor.template chip<0>(1);
30 for (
int i = 0;
i < 3; ++
i) {
31 for (
int j = 0;
j < 5; ++
j) {
32 for (
int k = 0; k < 7; ++k) {
33 for (
int l = 0;
l < 11; ++
l) {
45 for (
int i = 0;
i < 2; ++
i) {
46 for (
int j = 0;
j < 3; ++
j) {
47 for (
int k = 0; k < 7; ++k) {
48 for (
int l = 0;
l < 11; ++
l) {
60 for (
int i = 0;
i < 2; ++
i) {
61 for (
int j = 0;
j < 3; ++
j) {
62 for (
int k = 0; k < 7; ++k) {
63 for (
int l = 0;
l < 11; ++
l) {
75 for (
int i = 0;
i < 2; ++
i) {
76 for (
int j = 0;
j < 3; ++
j) {
77 for (
int k = 0; k < 5; ++k) {
78 for (
int l = 0;
l < 7; ++
l) {
90 for (
int i = 0;
i < 2; ++
i) {
91 for (
int j = 0;
j < 3; ++
j) {
92 for (
int k = 0; k < 5; ++k) {
93 for (
int l = 0;
l < 7; ++
l) {
101 template<
int DataLayout>
108 chip1 = tensor.
chip(1, 0);
113 for (
int i = 0;
i < 3; ++
i) {
114 for (
int j = 0;
j < 5; ++
j) {
115 for (
int k = 0; k < 7; ++k) {
116 for (
int l = 0;
l < 11; ++
l) {
128 for (
int i = 0;
i < 2; ++
i) {
129 for (
int j = 0;
j < 3; ++
j) {
130 for (
int k = 0; k < 7; ++k) {
131 for (
int l = 0;
l < 11; ++
l) {
143 for (
int i = 0;
i < 2; ++
i) {
144 for (
int j = 0;
j < 3; ++
j) {
145 for (
int k = 0; k < 7; ++k) {
146 for (
int l = 0;
l < 11; ++
l) {
158 for (
int i = 0;
i < 2; ++
i) {
159 for (
int j = 0;
j < 3; ++
j) {
160 for (
int k = 0; k < 5; ++k) {
161 for (
int l = 0;
l < 7; ++
l) {
173 for (
int i = 0;
i < 2; ++
i) {
174 for (
int j = 0;
j < 3; ++
j) {
175 for (
int k = 0; k < 5; ++k) {
176 for (
int l = 0;
l < 7; ++
l) {
184 template<
int DataLayout>
192 for (
int i = 0;
i < 3; ++
i) {
193 for (
int j = 0;
j < 5; ++
j) {
194 for (
int k = 0; k < 7; ++k) {
195 for (
int l = 0;
l < 11; ++
l) {
206 for (
int i = 0;
i < 3; ++
i) {
207 for (
int j = 0;
j < 7; ++
j) {
208 for (
int k = 0; k < 11; ++k) {
216 template<
int DataLayout>
225 tensor.template chip<0>(1) = input2;
226 for (
int i = 0;
i < 2; ++
i) {
227 for (
int j = 0;
j < 3; ++
j) {
228 for (
int k = 0; k < 5; ++k) {
229 for (
int l = 0;
l < 7; ++
l) {
230 for (
int m = 0;
m < 11; ++
m) {
245 tensor.template chip<1>(1) = input3;
246 for (
int i = 0;
i < 2; ++
i) {
247 for (
int j = 0;
j < 3; ++
j) {
248 for (
int k = 0; k < 5; ++k) {
249 for (
int l = 0;
l < 7; ++
l) {
250 for (
int m = 0;
m < 11; ++
m) {
265 tensor.template chip<2>(3) = input4;
266 for (
int i = 0;
i < 2; ++
i) {
267 for (
int j = 0;
j < 3; ++
j) {
268 for (
int k = 0; k < 5; ++k) {
269 for (
int l = 0;
l < 7; ++
l) {
270 for (
int m = 0;
m < 11; ++
m) {
285 tensor.template chip<3>(4) = input5;
286 for (
int i = 0;
i < 2; ++
i) {
287 for (
int j = 0;
j < 3; ++
j) {
288 for (
int k = 0; k < 5; ++k) {
289 for (
int l = 0;
l < 7; ++
l) {
290 for (
int m = 0;
m < 11; ++
m) {
305 tensor.template chip<4>(5) = input6;
306 for (
int i = 0;
i < 2; ++
i) {
307 for (
int j = 0;
j < 3; ++
j) {
308 for (
int k = 0; k < 5; ++k) {
309 for (
int l = 0;
l < 7; ++
l) {
310 for (
int m = 0;
m < 11; ++
m) {
325 tensor.
chip(0, 0) = input7.
chip(0, 0);
326 for (
int i = 0;
i < 2; ++
i) {
327 for (
int j = 0;
j < 3; ++
j) {
328 for (
int k = 0; k < 5; ++k) {
329 for (
int l = 0;
l < 7; ++
l) {
330 for (
int m = 0;
m < 11; ++
m) {
350 for (
int i = 0;
i < 2; ++
i) {
351 for (
int j = 0;
j < 3; ++
j) {
352 for (
int k = 0; k < 5; ++k) {
353 for (
int l = 0;
l < 7; ++
l) {
354 int chip_index =
i + 2 * (
j + 3 * (k + 5 *
l));
385 for (
int i = 0;
i < 7; ++
i) {
386 for (
int j = 0;
j < 5; ++
j) {
387 for (
int k = 0; k < 3; ++k) {
388 for (
int l = 0;
l < 2; ++
l) {
389 int chip_index =
l + 2 * (k + 3 * (
j + 5 *
i));
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(std::size_t n) const
static void test_dynamic_chip()
void test_cxx11_tensor_chipping()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setRandom()
static void test_chip_in_expr()
A cost model used to limit the number of threads used for evaluating tensor expression.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Tensor< Scalar_, NumIndices_, Options_, IndexType_ > > chip(const Index offset) const
static const Line3 l(Rot3(), 1, 1)
#define VERIFY_IS_EQUAL(a, b)
static void test_chip_as_lvalue()
#define CALL_SUBTEST(FUNC)
static void test_chip_raw_data_col_major()
static void test_simple_chip()
static void test_chip_raw_data_row_major()