10 #include <Eigen/CXX11/Tensor> 19 template <
int NumDims>
22 for (
int i = 0;
i < NumDims; ++
i) {
23 dims[
i] = internal::random<Index>(
min,
max);
30 template <
int NumDims>
37 template <
int Layout,
int NumDims>
45 for (
int i = 0;
i < NumDims; ++
i) {
52 for (
int i = 0;
i < NumDims; ++
i) {
53 offset += strides[
i] * offsets[
i];
61 template <
int Layout,
int NumDims>
64 using BlockMapper = internal::TensorBlockMapper<NumDims, Layout, Index>;
65 BlockMapper block_mapper(dims,
66 {internal::TensorBlockShapeType::kSkewedInnerDims,
67 internal::random<size_t>(1, dims.
TotalSize()),
70 Index total_blocks = block_mapper.blockCount();
71 Index block_index = internal::random<Index>(0, total_blocks - 1);
72 auto block = block_mapper.blockDescriptor(block_index);
75 auto strides = internal::strides<Layout>(dims);
79 Index index = block.offset();
80 if (static_cast<int>(Layout) == static_cast<int>(
ColMajor)) {
81 for (
int i = NumDims - 1;
i > 0; --
i) {
86 if (NumDims > 0) offsets[0] = index;
88 for (
int i = 0;
i < NumDims - 1; ++
i) {
93 if (NumDims > 0) offsets[NumDims - 1] = index;
99 template <
int NumDims>
102 for (
int i = 0;
i < NumDims; ++
i) offsets[
i] = 0;
108 Eigen::IndexList<Index, Eigen::type2index<1>>
ret;
113 Eigen::IndexList<Eigen::type2index<1>,
Index>
ret;
122 template <
typename T,
int NumDims,
int Layout,
typename Expression,
123 typename GenBlockParams>
129 typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;
130 TensorBlockScratch scratch(
d);
134 eval.evalSubExprsIfNeeded(
nullptr);
144 if (internal::random<bool>()) {
147 for (
int i = 0;
i < NumDims; ++
i) {
148 Index extent = internal::random<Index>(0, 5);
156 if (internal::random<bool>()) {
157 block_params.
desc.template AddDestinationBuffer<Layout>(
161 const bool root_of_expr = internal::random<bool>();
162 auto tensor_block =
eval.block(block_params.
desc, scratch, root_of_expr);
170 for (
int i = 0;
i < NumDims; ++
i) offsets[
i] = 0;
176 auto b_expr = tensor_block.expr();
181 using BlockExecutor =
TensorExecutor<
const BlockAssign, Device,
false,
187 tensor_block.cleanup();
191 auto s_expr = expr.slice(block_params.
offsets, block_params.
sizes);
195 using SliceExecutor =
TensorExecutor<
const SliceAssign, Device,
false,
207 template <
typename T,
int NumDims,
int Layout>
214 VerifyBlockEvaluator<T, NumDims, Layout>(
215 input, [&dims]() {
return RandomBlock<Layout>(dims, 1, 10); });
218 template <
typename T,
int NumDims,
int Layout>
224 VerifyBlockEvaluator<T, NumDims, Layout>(
225 input.abs(), [&dims]() {
return RandomBlock<Layout>(dims, 1, 10); });
228 template <
typename T,
int NumDims,
int Layout>
235 VerifyBlockEvaluator<T, NumDims, Layout>(
236 lhs * rhs, [&dims]() {
return RandomBlock<Layout>(dims, 1, 10); });
239 template <
typename T,
int NumDims,
int Layout>
246 VerifyBlockEvaluator<T, NumDims, Layout>(
247 (lhs.square() + rhs.square()).
sqrt(),
248 [&dims]() {
return RandomBlock<Layout>(dims, 1, 10); });
251 template <
typename T,
int NumDims,
int Layout>
260 for (
int i = 0;
i < NumDims; ++
i) bcasted_dims[
i] = dims[
i] * bcast[
i];
262 VerifyBlockEvaluator<T, NumDims, Layout>(
263 input.broadcast(bcast),
264 [&bcasted_dims]() {
return SkewedInnerBlock<Layout>(bcasted_dims); });
266 VerifyBlockEvaluator<T, NumDims, Layout>(
267 input.broadcast(bcast),
268 [&bcasted_dims]() {
return RandomBlock<Layout>(bcasted_dims, 5, 10); });
270 VerifyBlockEvaluator<T, NumDims, Layout>(
271 input.broadcast(bcast),
276 VerifyBlockEvaluator<T, NumDims, Layout>(
277 input.broadcast(bcast) * input.abs().broadcast(bcast),
278 [&bcasted_dims]() {
return SkewedInnerBlock<Layout>(bcasted_dims); });
281 template <
typename T,
int NumDims,
int Layout>
286 std::shuffle(&shuffled[0], &shuffled[NumDims - 1], std::mt19937(
g_seed));
291 VerifyBlockEvaluator<T, NumDims, Layout>(
293 [&shuffled]() {
return RandomBlock<Layout>(shuffled, 1, 10); });
295 VerifyBlockEvaluator<T, NumDims, Layout>(
297 [&shuffled]() {
return SkewedInnerBlock<Layout>(shuffled); });
300 template <
typename T,
int NumDims,
int Layout>
306 VerifyBlockEvaluator<T, NumDims, Layout>(
307 input.template cast<int>().
template cast<T>(),
308 [&dims]() {
return RandomBlock<Layout>(dims, 1, 10); });
311 template <
typename T,
int NumDims,
int Layout>
321 VerifyBlockEvaluator<T, NumDims, Layout>(cond.select(lhs, rhs), [&dims]() {
322 return RandomBlock<Layout>(dims, 1, 20);
326 template <
typename T,
int NumDims,
int Layout>
328 const int inner_dim = Layout ==
static_cast<int>(
ColMajor) ? 0 : NumDims - 1;
337 for (
int i = 0;
i < NumDims; ++
i) {
338 paddings[
i] = std::make_pair(pad_before[
i], pad_after[i]);
342 if (internal::random<bool>()) {
343 pad_before[inner_dim] = 0;
344 pad_after[inner_dim] = 0;
345 paddings[inner_dim] = std::make_pair(0, 0);
349 for (
int i = 0;
i < NumDims; ++
i) {
350 padded_dims[
i] = dims[
i] + pad_before[
i] + pad_after[
i];
353 VerifyBlockEvaluator<T, NumDims, Layout>(
357 VerifyBlockEvaluator<T, NumDims, Layout>(
359 [&padded_dims]() {
return RandomBlock<Layout>(padded_dims, 1, 10); });
361 VerifyBlockEvaluator<T, NumDims, Layout>(
363 [&padded_dims]() {
return SkewedInnerBlock<Layout>(padded_dims); });
366 template <
typename T,
int NumDims,
int Layout>
372 Index chip_dim = internal::random<int>(0, NumDims - 1);
373 Index chip_offset = internal::random<Index>(0, dims[chip_dim] - 2);
376 for (Index
i = 0;
i < chip_dim; ++
i) {
377 chipped_dims[
i] = dims[
i];
379 for (Index
i = chip_dim + 1;
i < NumDims; ++
i) {
380 chipped_dims[
i - 1] = dims[
i];
385 input.chip(chip_offset, chip_dim),
389 input.chip(chip_offset, chip_dim),
390 [&chipped_dims]() {
return RandomBlock<Layout>(chipped_dims, 1, 10); });
394 input.abs().chip(chip_offset, chip_dim),
398 input.abs().chip(chip_offset, chip_dim),
399 [&chipped_dims]() {
return RandomBlock<Layout>(chipped_dims, 1, 10); });
403 template<
typename T,
int NumDims>
407 for (
int i = 0;
i < NumDims; ++
i) {
408 result +=
static_cast<T>((
i + 1) * coords[
i]);
415 template<
int NumDims>
419 for (
int i = 0;
i < NumDims; ++
i) {
427 template <
typename T,
int NumDims,
int Layout>
435 VerifyBlockEvaluator<T, NumDims, Layout>(
436 input.generate(generator), [&dims]() {
return FixedSizeBlock(dims); });
438 VerifyBlockEvaluator<T, NumDims, Layout>(
439 input.generate(generator),
440 [&dims]() {
return RandomBlock<Layout>(dims, 1, 10); });
443 template <
typename T,
int NumDims,
int Layout>
451 for (
int i = 0; i < NumDims; ++i) reverse[i] = internal::random<bool>();
453 VerifyBlockEvaluator<T, NumDims, Layout>(
454 input.reverse(reverse), [&dims]() {
return FixedSizeBlock(dims); });
456 VerifyBlockEvaluator<T, NumDims, Layout>(input.reverse(reverse), [&dims]() {
457 return RandomBlock<Layout>(dims, 1, 10);
461 template <
typename T,
int NumDims,
int Layout>
472 for (
int i = 0;
i < NumDims; ++
i) {
474 slice_size[
i] =
numext::mini(slice_size[i], dims[i] - slice_start[i]);
477 VerifyBlockEvaluator<T, NumDims, Layout>(
478 input.slice(slice_start, slice_size),
481 VerifyBlockEvaluator<T, NumDims, Layout>(
482 input.slice(slice_start, slice_size),
483 [&slice_size]() {
return RandomBlock<Layout>(slice_size, 1, 10); });
486 template <
typename T,
int NumDims,
int Layout>
493 for (
int i = 0;
i < NumDims; ++
i) shuffle[
i] =
i;
497 for (
int i = 0;
i < NumDims; ++
i) shuffled_dims[
i] = dims[shuffle[
i]];
499 VerifyBlockEvaluator<T, NumDims, Layout>(
500 input.shuffle(shuffle),
503 VerifyBlockEvaluator<T, NumDims, Layout>(
504 input.shuffle(shuffle), [&shuffled_dims]() {
505 return RandomBlock<Layout>(shuffled_dims, 1, 5);
510 }
while (std::next_permutation(&shuffle[0], &shuffle[0] + NumDims));
513 template <
typename T,
int Layout>
515 Index dim = internal::random<Index>(1, 100);
522 auto reshapeLhs =
NByOne(dim);
523 auto reshapeRhs =
OneByM(dim);
525 auto bcastLhs =
OneByM(dim);
526 auto bcastRhs =
NByOne(dim);
530 VerifyBlockEvaluator<T, 2, Layout>(
531 lhs.reshape(reshapeLhs).broadcast(bcastLhs) *
532 rhs.
reshape(reshapeRhs).broadcast(bcastRhs),
533 [dims]() {
return SkewedInnerBlock<Layout, 2>(dims); });
536 template <
typename T,
int Layout>
538 Index dim = internal::random<Index>(1, 100);
545 auto bcastLhs =
OneByM(dim);
546 auto bcastRhs =
NByOne(dim);
550 VerifyBlockEvaluator<T, 2, Layout>(
551 (lhs.broadcast(bcastLhs) * rhs.broadcast(bcastRhs)).
eval().reshape(dims),
552 [dims]() {
return SkewedInnerBlock<Layout, 2>(dims); });
554 VerifyBlockEvaluator<T, 2, Layout>(
555 (lhs.broadcast(bcastLhs) * rhs.broadcast(bcastRhs)).
eval().reshape(dims),
556 [dims]() {
return RandomBlock<Layout, 2>(dims, 1, 50); });
559 template <
typename T,
int Layout>
561 if (Layout != static_cast<int>(
RowMajor))
return;
563 Index dim0 = internal::random<Index>(1, 10);
564 Index dim1 = internal::random<Index>(1, 10);
565 Index dim2 = internal::random<Index>(1, 10);
573 VerifyBlockEvaluator<T, 2, Layout>(
574 input.broadcast(bcast).chip(0, 1),
577 VerifyBlockEvaluator<T, 2, Layout>(
578 input.broadcast(bcast).chip(0, 1),
579 [chipped_dims]() {
return SkewedInnerBlock<Layout, 2>(chipped_dims); });
581 VerifyBlockEvaluator<T, 2, Layout>(
582 input.broadcast(bcast).chip(0, 1),
583 [chipped_dims]() {
return RandomBlock<Layout, 2>(chipped_dims, 1, 5); });
591 template <
typename T,
int NumDims,
int Layout,
int NumExprDims = NumDims,
592 typename Expression,
typename GenBlockParams>
594 Expression expr, GenBlockParams gen_block) {
612 internal::TensorMaterializedBlock<T, NumExprDims, Layout> blk(
619 eval.writeBlock(block_params.desc, blk);
631 auto s_expr = expr.slice(block_params.offsets, block_params.sizes);
635 using SliceExecutor =
TensorExecutor<
const SliceAssign, Device,
false,
649 template <
typename T,
int NumDims,
int Layout>
656 VerifyBlockAssignment<T, NumDims, Layout>(
657 tensor, map, [&dims]() {
return RandomBlock<Layout>(dims, 10, 20); });
658 VerifyBlockAssignment<T, NumDims, Layout>(
662 template <
typename T,
int NumDims,
int Layout>
670 std::shuffle(&shuffled[0], &shuffled[NumDims - 1], std::mt19937(
g_seed));
672 VerifyBlockAssignment<T, NumDims, Layout>(
673 tensor, map.reshape(shuffled),
674 [&shuffled]() {
return RandomBlock<Layout>(shuffled, 1, 10); });
676 VerifyBlockAssignment<T, NumDims, Layout>(
677 tensor, map.reshape(shuffled),
678 [&shuffled]() {
return SkewedInnerBlock<Layout>(shuffled); });
680 VerifyBlockAssignment<T, NumDims, Layout>(
681 tensor, map.reshape(shuffled),
685 template <
typename T,
int NumDims,
int Layout>
690 Index chip_dim = internal::random<int>(0, NumDims - 1);
691 Index chip_offset = internal::random<Index>(0, dims[chip_dim] - 2);
694 for (Index
i = 0;
i < chip_dim; ++
i) {
695 chipped_dims[
i] = dims[
i];
697 for (Index
i = chip_dim + 1;
i < NumDims; ++
i) {
698 chipped_dims[
i - 1] = dims[
i];
704 tensor, map.chip(chip_offset, chip_dim),
705 [&chipped_dims]() {
return RandomBlock<Layout>(chipped_dims, 1, 10); });
708 tensor, map.
chip(chip_offset, chip_dim),
709 [&chipped_dims]() {
return SkewedInnerBlock<Layout>(chipped_dims); });
712 tensor, map.
chip(chip_offset, chip_dim),
716 template <
typename T,
int NumDims,
int Layout>
726 for (
int i = 0;
i < NumDims; ++
i) {
728 slice_size[
i] =
numext::mini(slice_size[i], dims[i] - slice_start[i]);
733 VerifyBlockAssignment<T, NumDims, Layout>(
734 tensor, map.slice(slice_start, slice_size),
735 [&slice_size]() {
return RandomBlock<Layout>(slice_size, 1, 10); });
737 VerifyBlockAssignment<T, NumDims, Layout>(
738 tensor, map.
slice(slice_start, slice_size),
739 [&slice_size]() {
return SkewedInnerBlock<Layout>(slice_size); });
741 VerifyBlockAssignment<T, NumDims, Layout>(
742 tensor, map.
slice(slice_start, slice_size),
746 template <
typename T,
int NumDims,
int Layout>
752 for (
int i = 0;
i < NumDims; ++
i) shuffle[
i] =
i;
758 for (
int i = 0;
i < NumDims; ++
i) shuffled_dims[
i] = dims[shuffle[
i]];
760 VerifyBlockAssignment<T, NumDims, Layout>(
761 tensor, map.shuffle(shuffle),
764 VerifyBlockAssignment<T, NumDims, Layout>(
765 tensor, map.shuffle(shuffle), [&shuffled_dims]() {
766 return RandomBlock<Layout>(shuffled_dims, 1, 5);
769 }
while (std::next_permutation(&shuffle[0], &shuffle[0] + NumDims));
774 #define CALL_SUBTEST_PART(PART) \ 777 #define CALL_SUBTESTS_DIMS_LAYOUTS_TYPES(PART, NAME) \ 778 CALL_SUBTEST_PART(PART)((NAME<float, 1, RowMajor>())); \ 779 CALL_SUBTEST_PART(PART)((NAME<float, 2, RowMajor>())); \ 780 CALL_SUBTEST_PART(PART)((NAME<float, 3, RowMajor>())); \ 781 CALL_SUBTEST_PART(PART)((NAME<float, 4, RowMajor>())); \ 782 CALL_SUBTEST_PART(PART)((NAME<float, 5, RowMajor>())); \ 783 CALL_SUBTEST_PART(PART)((NAME<float, 1, ColMajor>())); \ 784 CALL_SUBTEST_PART(PART)((NAME<float, 2, ColMajor>())); \ 785 CALL_SUBTEST_PART(PART)((NAME<float, 4, ColMajor>())); \ 786 CALL_SUBTEST_PART(PART)((NAME<float, 4, ColMajor>())); \ 787 CALL_SUBTEST_PART(PART)((NAME<float, 5, ColMajor>())); \ 788 CALL_SUBTEST_PART(PART)((NAME<int, 1, RowMajor>())); \ 789 CALL_SUBTEST_PART(PART)((NAME<int, 2, RowMajor>())); \ 790 CALL_SUBTEST_PART(PART)((NAME<int, 3, RowMajor>())); \ 791 CALL_SUBTEST_PART(PART)((NAME<int, 4, RowMajor>())); \ 792 CALL_SUBTEST_PART(PART)((NAME<int, 5, RowMajor>())); \ 793 CALL_SUBTEST_PART(PART)((NAME<int, 1, ColMajor>())); \ 794 CALL_SUBTEST_PART(PART)((NAME<int, 2, ColMajor>())); \ 795 CALL_SUBTEST_PART(PART)((NAME<int, 4, ColMajor>())); \ 796 CALL_SUBTEST_PART(PART)((NAME<int, 4, ColMajor>())); \ 797 CALL_SUBTEST_PART(PART)((NAME<int, 5, ColMajor>())); \ 798 CALL_SUBTEST_PART(PART)((NAME<bool, 1, RowMajor>())); \ 799 CALL_SUBTEST_PART(PART)((NAME<bool, 2, RowMajor>())); \ 800 CALL_SUBTEST_PART(PART)((NAME<bool, 3, RowMajor>())); \ 801 CALL_SUBTEST_PART(PART)((NAME<bool, 4, RowMajor>())); \ 802 CALL_SUBTEST_PART(PART)((NAME<bool, 5, RowMajor>())); \ 803 CALL_SUBTEST_PART(PART)((NAME<bool, 1, ColMajor>())); \ 804 CALL_SUBTEST_PART(PART)((NAME<bool, 2, ColMajor>())); \ 805 CALL_SUBTEST_PART(PART)((NAME<bool, 4, ColMajor>())); \ 806 CALL_SUBTEST_PART(PART)((NAME<bool, 4, ColMajor>())); \ 807 CALL_SUBTEST_PART(PART)((NAME<bool, 5, ColMajor>())) 809 #define CALL_SUBTESTS_DIMS_LAYOUTS(PART, NAME) \ 810 CALL_SUBTEST_PART(PART)((NAME<float, 1, RowMajor>())); \ 811 CALL_SUBTEST_PART(PART)((NAME<float, 2, RowMajor>())); \ 812 CALL_SUBTEST_PART(PART)((NAME<float, 3, RowMajor>())); \ 813 CALL_SUBTEST_PART(PART)((NAME<float, 4, RowMajor>())); \ 814 CALL_SUBTEST_PART(PART)((NAME<float, 5, RowMajor>())); \ 815 CALL_SUBTEST_PART(PART)((NAME<float, 1, ColMajor>())); \ 816 CALL_SUBTEST_PART(PART)((NAME<float, 2, ColMajor>())); \ 817 CALL_SUBTEST_PART(PART)((NAME<float, 4, ColMajor>())); \ 818 CALL_SUBTEST_PART(PART)((NAME<float, 4, ColMajor>())); \ 819 CALL_SUBTEST_PART(PART)((NAME<float, 5, ColMajor>())) 821 #define CALL_SUBTESTS_LAYOUTS_TYPES(PART, NAME) \ 822 CALL_SUBTEST_PART(PART)((NAME<float, RowMajor>())); \ 823 CALL_SUBTEST_PART(PART)((NAME<float, ColMajor>())); \ 824 CALL_SUBTEST_PART(PART)((NAME<bool, RowMajor>())); \ 825 CALL_SUBTEST_PART(PART)((NAME<bool, ColMajor>()))
static TensorBlockParams< NumDims > FixedSizeBlock(DSizes< Index, NumDims > dims)
static void test_eval_tensor_reshape()
static void test_eval_tensor_binary_with_unary_expr_block()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(const array< Index, NumIndices > &indices) const
static void VerifyBlockAssignment(Tensor< T, NumDims, Layout > &tensor, Expression expr, GenBlockParams gen_block)
static void test_eval_tensor_slice()
static void test_assign_to_tensor_reshape()
m m block(1, 0, 2, 2)<< 4
Eigen::IndexList< Index, Eigen::type2index< 1 > > NByOne(Index n)
EIGEN_DECLARE_TEST(cxx11_tensor_block_eval)
static void test_eval_tensor_binary_expr_block()
static TensorBlockParams< NumDims > SkewedInnerBlock(DSizes< Index, NumDims > dims)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool dimensions_match(Dims1 dims1, Dims2 dims2)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setRandom()
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate offset
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
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 TensorMap< PlainObjectType, Options_, MakePointer_ > > chip(const Index offset) const
static void test_assign_to_tensor()
#define CALL_SUBTESTS_LAYOUTS_TYPES(PART, NAME)
IndexType dimension(int index) const
static void test_assign_to_tensor_shuffle()
static void test_eval_tensor_block()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Tensor< Scalar_, NumIndices_, Options_, IndexType_ > > reshape(const NewDimensions &newDimensions) const
#define CALL_SUBTESTS_DIMS_LAYOUTS(PART, NAME)
static void test_eval_tensor_broadcast()
DSizes< Index, NumDims > offsets
#define VERIFY_IS_EQUAL(a, b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex TotalSize() const
A tensor expression mapping an existing array of data.
static void test_assign_to_tensor_chipping()
DSizes< Index, NumDims > sizes
EIGEN_ALWAYS_INLINE DSizes< IndexType, NumDims > strides(const DSizes< IndexType, NumDims > &dimensions)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Eigen::Triplet< double > T
#define CALL_SUBTESTS_DIMS_LAYOUTS_TYPES(PART, NAME)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp< const StartIndices, const Sizes, const Tensor< Scalar_, NumIndices_, Options_, IndexType_ > > slice(const StartIndices &startIndices, const Sizes &sizes) const
static void test_eval_tensor_select()
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
static void test_eval_tensor_forced_eval()
static void VerifyBlockEvaluator(Expression expr, GenBlockParams gen_block)
static void test_assign_to_tensor_slice()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
static void test_eval_tensor_shuffle()
static void test_eval_tensor_padding()
static DSizes< Index, NumDims > RandomDims(Index min, Index max)
TensorBlockDescriptor< NumDims, Index > desc
const Dimensions & dimensions() const
void reverse(const MatrixType &m)
static void test_eval_tensor_chipping()
T operator()(const array< Index, NumDims > &coords) const
static void test_eval_tensor_chipping_of_bcast()
bool operator()(const array< Index, NumDims > &coords) const
internal::nested_eval< T, 1 >::type eval(const T &xpr)
static void test_eval_tensor_generator()
Jet< T, N > sqrt(const Jet< T, N > &f)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
static void test_eval_tensor_unary_expr_block()
static void test_eval_tensor_reshape_with_bcast()
static void test_eval_tensor_cast()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setZero()
static TensorBlockParams< NumDims > RandomBlock(DSizes< Index, NumDims > dims, Index min, Index max)
static void test_eval_tensor_reverse()
static unsigned int g_seed
Eigen::IndexList< Eigen::type2index< 1 >, Index > OneByM(Index m)