diff options
Diffstat (limited to 'unsupported/test')
-rw-r--r-- | unsupported/test/cxx11_tensor_executor.cpp | 2 | ||||
-rw-r--r-- | unsupported/test/cxx11_tensor_shuffling.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/unsupported/test/cxx11_tensor_executor.cpp b/unsupported/test/cxx11_tensor_executor.cpp index 448f47f1d..d16ae4d11 100644 --- a/unsupported/test/cxx11_tensor_executor.cpp +++ b/unsupported/test/cxx11_tensor_executor.cpp @@ -317,7 +317,7 @@ static void test_execute_reshape(Device d) DSizes<Index, ReshapedDims> reshaped_dims; reshaped_dims[shuffle[0]] = dims[0] * dims[1]; - for (int i = 2; i < NumDims; ++i) reshaped_dims[shuffle[i]] = dims[i]; + for (int i = 1; i < ReshapedDims; ++i) reshaped_dims[shuffle[i]] = dims[i + 1]; Tensor<T, ReshapedDims, Options, Index> golden = src.reshape(reshaped_dims); diff --git a/unsupported/test/cxx11_tensor_shuffling.cpp b/unsupported/test/cxx11_tensor_shuffling.cpp index ab19b6e6b..467df39c7 100644 --- a/unsupported/test/cxx11_tensor_shuffling.cpp +++ b/unsupported/test/cxx11_tensor_shuffling.cpp @@ -83,10 +83,10 @@ static void test_expr_shuffling() Tensor<float, 4, DataLayout> result(5,7,3,2); - array<int, 4> src_slice_dim{{2,3,1,7}}; - array<int, 4> src_slice_start{{0,0,0,0}}; - array<int, 4> dst_slice_dim{{1,7,3,2}}; - array<int, 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) = |