From da5b98a94d2a3a5a4963262fc1b33d75633b3b83 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 16 Apr 2015 12:29:16 -0700 Subject: Updated the cxx11_tensor_convolution test to avoid using cxx11 features. This should enable the test to compile with gcc 4.7 and older --- unsupported/test/cxx11_tensor_convolution.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'unsupported/test/cxx11_tensor_convolution.cpp') diff --git a/unsupported/test/cxx11_tensor_convolution.cpp b/unsupported/test/cxx11_tensor_convolution.cpp index e17b5952c..e3d4675eb 100644 --- a/unsupported/test/cxx11_tensor_convolution.cpp +++ b/unsupported/test/cxx11_tensor_convolution.cpp @@ -51,7 +51,9 @@ static void test_expr() kernel.setRandom(); Tensor result(2,2); - Eigen::array dims({0, 1}); + Eigen::array dims; + dims[0] = 0; + dims[1] = 1; result = input.convolve(kernel, dims); VERIFY_IS_APPROX(result(0,0), input(0,0)*kernel(0,0) + input(0,1)*kernel(0,1) + @@ -75,7 +77,8 @@ static void test_modes() { kernel(1) = 1.0f; kernel(2) = 0.0f; - const Eigen::array dims({0}); + Eigen::array dims; + dims[0] = 0; Eigen::array, 1> padding; // Emulate VALID mode (as defined in @@ -116,9 +119,12 @@ static void test_strides() { input.setRandom(); kernel.setRandom(); - const Eigen::array dims({0}); - const Eigen::array stride_of_3({3}); - const Eigen::array stride_of_2({2}); + Eigen::array dims; + dims[0] = 0; + Eigen::array stride_of_3; + stride_of_3[0] = 3; + Eigen::array stride_of_2; + stride_of_2[0] = 2; Tensor result; result = input.stride(stride_of_3).convolve(kernel, dims).stride(stride_of_2); -- cgit v1.2.3