mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Silenced one more comilation warning
This commit is contained in:
parent
1a7b84dc75
commit
61409d9449
@ -22,11 +22,11 @@ static void test_simple_reshape()
|
||||
Tensor<float, 2> tensor3(6,7);
|
||||
Tensor<float, 2> tensor4(2,21);
|
||||
|
||||
Tensor<float, 3>::Dimensions dim1{{2,3,7}};
|
||||
Tensor<float, 3>::Dimensions dim1(2,3,7);
|
||||
tensor2 = tensor1.reshape(dim1);
|
||||
Tensor<float, 2>::Dimensions dim2{{6,7}};
|
||||
Tensor<float, 2>::Dimensions dim2(6,7);
|
||||
tensor3 = tensor1.reshape(dim2);
|
||||
Tensor<float, 2>::Dimensions dim3{{2,21}};
|
||||
Tensor<float, 2>::Dimensions dim3(2,21);
|
||||
tensor4 = tensor1.reshape(dim1).reshape(dim3);
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
@ -50,8 +50,8 @@ static void test_reshape_in_expr() {
|
||||
|
||||
TensorMap<Tensor<float, 5>> tensor1(m1.data(), 2,3,5,7,11);
|
||||
TensorMap<Tensor<float, 5>> tensor2(m2.data(), 3,5,7,11,13);
|
||||
Tensor<float, 2>::Dimensions newDims1{{2,3*5*7*11}};
|
||||
Tensor<float, 2>::Dimensions newDims2{{3*5*7*11,13}};
|
||||
Tensor<float, 2>::Dimensions newDims1(2,3*5*7*11);
|
||||
Tensor<float, 2>::Dimensions newDims2(3*5*7*11,13);
|
||||
typedef Tensor<float, 1>::DimensionPair DimPair;
|
||||
array<DimPair, 1> contract_along{{DimPair(1, 0)}};
|
||||
Tensor<float, 2> tensor3(2,13);
|
||||
@ -72,7 +72,7 @@ static void test_reshape_as_lvalue()
|
||||
tensor.setRandom();
|
||||
|
||||
Tensor<float, 2> tensor2d(6,7);
|
||||
Tensor<float, 3>::Dimensions dim{{2,3,7}};
|
||||
Tensor<float, 3>::Dimensions dim(2,3,7);
|
||||
tensor2d.reshape(dim) = tensor;
|
||||
|
||||
float scratch[2*3*1*7*1];
|
||||
@ -311,7 +311,7 @@ static void test_composition()
|
||||
Eigen::Tensor<float, 2, DataLayout> matrix(7, 11);
|
||||
matrix.setRandom();
|
||||
|
||||
const DSizes<ptrdiff_t, 3> newDims{{1, 1, 11}};
|
||||
const DSizes<ptrdiff_t, 3> newDims(1, 1, 11);
|
||||
Eigen::Tensor<float, 3, DataLayout> tensor =
|
||||
matrix.slice(DSizes<ptrdiff_t, 2>(2, 0), DSizes<ptrdiff_t, 2>(1, 11)).reshape(newDims);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user