Fix missing-braces warnings

This commit is contained in:
Christoph Hertzberg 2018-08-24 23:56:13 +02:00
parent 5aaedbeced
commit 495f6c3c3a
3 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ static void test_static_dimension_failure()
// either the code should change to // either the code should change to
// Tensor<int, 2>::Dimensions{{2, 3}} // Tensor<int, 2>::Dimensions{{2, 3}}
// or Tensor<int, 2>::Dimensions{Tensor<int, 2>::Dimensions{{2, 3}}} // or Tensor<int, 2>::Dimensions{Tensor<int, 2>::Dimensions{{2, 3}}}
.concatenate(right.reshape(Tensor<int, 2>::Dimensions{{2, 3}}), 0); .concatenate(right.reshape(Tensor<int, 2>::Dimensions{{{2, 3}}}), 0);
} }
template<int DataLayout> template<int DataLayout>

View File

@ -471,7 +471,7 @@ static void test_tensor_product()
mat1.setRandom(); mat1.setRandom();
mat2.setRandom(); mat2.setRandom();
Tensor<float, 4, DataLayout> result = mat1.contract(mat2, Eigen::array<DimPair, 0>{}); Tensor<float, 4, DataLayout> result = mat1.contract(mat2, Eigen::array<DimPair, 0>{{}});
VERIFY_IS_EQUAL(result.dimension(0), 2); VERIFY_IS_EQUAL(result.dimension(0), 2);
VERIFY_IS_EQUAL(result.dimension(1), 3); VERIFY_IS_EQUAL(result.dimension(1), 3);

View File

@ -25,7 +25,7 @@ static void test_evals()
Tensor<float, 2, DataLayout> result(2,3); Tensor<float, 2, DataLayout> result(2,3);
result.setZero(); result.setZero();
Eigen::array<Tensor<float, 2>::Index, 1> dims3{0}; Eigen::array<Tensor<float, 2>::Index, 1> dims3{{0}};
typedef TensorEvaluator<decltype(input.convolve(kernel, dims3)), DefaultDevice> Evaluator; typedef TensorEvaluator<decltype(input.convolve(kernel, dims3)), DefaultDevice> Evaluator;
Evaluator eval(input.convolve(kernel, dims3), DefaultDevice()); Evaluator eval(input.convolve(kernel, dims3), DefaultDevice());