mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
merge
This commit is contained in:
commit
e04faca930
@ -21,9 +21,9 @@ namespace Eigen {
|
||||
template <typename T, size_t n> class array {
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE T& operator[] (size_t index) { return values[index]; }
|
||||
EIGEN_STRONG_INLINE T& operator[] (size_t index) { eigen_internal_assert(index < size()); return values[index]; }
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE const T& operator[] (size_t index) const { return values[index]; }
|
||||
EIGEN_STRONG_INLINE const T& operator[] (size_t index) const { eigen_internal_assert(index < size()); return values[index]; }
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE T& at(size_t index) { eigen_assert(index < size()); return values[index]; }
|
||||
|
@ -83,10 +83,10 @@ static void test_expr_shuffling()
|
||||
|
||||
Tensor<float, 4, DataLayout> result(5, 7, 3, 2);
|
||||
|
||||
array<ptrdiff_t, 4> src_slice_dim({2, 3, 1, 7});
|
||||
array<ptrdiff_t, 4> src_slice_start({0, 0, 0, 0});
|
||||
array<ptrdiff_t, 4> dst_slice_dim({1, 7, 3, 2});
|
||||
array<ptrdiff_t, 4> dst_slice_start({0, 0, 0, 0});
|
||||
array<ptrdiff_t, 4> src_slice_dim{{2, 3, 1, 7}};
|
||||
array<ptrdiff_t, 4> src_slice_start{{0, 0, 0, 0}};
|
||||
array<ptrdiff_t, 4> dst_slice_dim{{1, 7, 3, 2}};
|
||||
array<ptrdiff_t, 4> dst_slice_start{{0, 0, 0, 0}};
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
result.slice(dst_slice_start, dst_slice_dim) =
|
||||
|
Loading…
Reference in New Issue
Block a user