diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/adjoint.cpp | 2 | ||||
-rw-r--r-- | test/block.cpp | 6 | ||||
-rw-r--r-- | test/cholesky.cpp | 2 | ||||
-rw-r--r-- | test/determinant.cpp | 1 | ||||
-rw-r--r-- | test/inverse.cpp | 2 | ||||
-rw-r--r-- | test/nomalloc.cpp | 10 | ||||
-rw-r--r-- | test/product.h | 7 | ||||
-rw-r--r-- | test/product_trmv.cpp | 1 | ||||
-rw-r--r-- | test/selfadjoint.cpp | 5 | ||||
-rw-r--r-- | test/triangular.cpp | 26 |
10 files changed, 18 insertions, 44 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp index 76c59bedd..140283477 100644 --- a/test/adjoint.cpp +++ b/test/adjoint.cpp @@ -43,8 +43,6 @@ template<typename MatrixType> void adjoint(const MatrixType& m) MatrixType m1 = MatrixType::Random(rows, cols), m2 = MatrixType::Random(rows, cols), m3(rows, cols), - mzero = MatrixType::Zero(rows, cols), - identity = SquareMatrixType::Identity(rows, rows), square = SquareMatrixType::Random(rows, rows); VectorType v1 = VectorType::Random(rows), v2 = VectorType::Random(rows), diff --git a/test/block.cpp b/test/block.cpp index 70852ee48..07d5ce792 100644 --- a/test/block.cpp +++ b/test/block.cpp @@ -42,12 +42,8 @@ template<typename MatrixType> void block(const MatrixType& m) m1_copy = m1, m2 = MatrixType::Random(rows, cols), m3(rows, cols), - mzero = MatrixType::Zero(rows, cols), ones = MatrixType::Ones(rows, cols); - VectorType v1 = VectorType::Random(rows), - v2 = VectorType::Random(rows), - v3 = VectorType::Random(rows), - vzero = VectorType::Zero(rows); + VectorType v1 = VectorType::Random(rows); Scalar s1 = internal::random<Scalar>(); diff --git a/test/cholesky.cpp b/test/cholesky.cpp index 35f5a3b68..2b646e329 100644 --- a/test/cholesky.cpp +++ b/test/cholesky.cpp @@ -325,4 +325,6 @@ void test_cholesky() // Test problem size constructors CALL_SUBTEST_9( LLT<MatrixXf>(10) ); CALL_SUBTEST_9( LDLT<MatrixXf>(10) ); + + EIGEN_UNUSED_VARIABLE(s) } diff --git a/test/determinant.cpp b/test/determinant.cpp index eadc8c6b4..6c8d3baab 100644 --- a/test/determinant.cpp +++ b/test/determinant.cpp @@ -78,4 +78,5 @@ void test_determinant() s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4); CALL_SUBTEST_6( determinant(MatrixXd(s, s)) ); } + EIGEN_UNUSED_VARIABLE(s) } diff --git a/test/inverse.cpp b/test/inverse.cpp index f0c69e78c..81702432f 100644 --- a/test/inverse.cpp +++ b/test/inverse.cpp @@ -41,7 +41,6 @@ template<typename MatrixType> void inverse(const MatrixType& m) MatrixType m1(rows, cols), m2(rows, cols), - mzero = MatrixType::Zero(rows, cols), identity = MatrixType::Identity(rows, rows); createRandomPIMatrixOfRank(rows,rows,rows,m1); m2 = m1.inverse(); @@ -114,4 +113,5 @@ void test_inverse() CALL_SUBTEST_7( inverse(Matrix4d()) ); CALL_SUBTEST_7( inverse(Matrix<double,4,4,DontAlign>()) ); } + EIGEN_UNUSED_VARIABLE(s) } diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp index 96ff16dae..273b1f7ad 100644 --- a/test/nomalloc.cpp +++ b/test/nomalloc.cpp @@ -52,15 +52,7 @@ template<typename MatrixType> void nomalloc(const MatrixType& m) MatrixType m1 = MatrixType::Random(rows, cols), m2 = MatrixType::Random(rows, cols), - m3(rows, cols), - mzero = MatrixType::Zero(rows, cols), - identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Identity(rows, rows), - square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Random(rows, rows); - VectorType v1 = VectorType::Random(rows), - v2 = VectorType::Random(rows), - vzero = VectorType::Zero(rows); + m3(rows, cols); Scalar s1 = internal::random<Scalar>(); diff --git a/test/product.h b/test/product.h index 40ae4d51b..e77f8c41e 100644 --- a/test/product.h +++ b/test/product.h @@ -54,8 +54,7 @@ template<typename MatrixType> void product(const MatrixType& m) // to test it, hence I consider that we will have tested Random.h MatrixType m1 = MatrixType::Random(rows, cols), m2 = MatrixType::Random(rows, cols), - m3(rows, cols), - mzero = MatrixType::Zero(rows, cols); + m3(rows, cols); RowSquareMatrixType identity = RowSquareMatrixType::Identity(rows, rows), square = RowSquareMatrixType::Random(rows, rows), @@ -63,9 +62,7 @@ template<typename MatrixType> void product(const MatrixType& m) ColSquareMatrixType square2 = ColSquareMatrixType::Random(cols, cols), res2 = ColSquareMatrixType::Random(cols, cols); - RowVectorType v1 = RowVectorType::Random(rows), - v2 = RowVectorType::Random(rows), - vzero = RowVectorType::Zero(rows); + RowVectorType v1 = RowVectorType::Random(rows); ColVectorType vc2 = ColVectorType::Random(cols), vcres(cols); OtherMajorMatrixType tm1 = m1; diff --git a/test/product_trmv.cpp b/test/product_trmv.cpp index 0f676beca..52707d22b 100644 --- a/test/product_trmv.cpp +++ b/test/product_trmv.cpp @@ -100,4 +100,5 @@ void test_product_trmv() s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE); CALL_SUBTEST_6( trmv(Matrix<float,Dynamic,Dynamic,RowMajor>(s, s)) ); } + EIGEN_UNUSED_VARIABLE(s); } diff --git a/test/selfadjoint.cpp b/test/selfadjoint.cpp index 364478b80..db66017c1 100644 --- a/test/selfadjoint.cpp +++ b/test/selfadjoint.cpp @@ -54,7 +54,8 @@ template<typename MatrixType> void selfadjoint(const MatrixType& m) void bug_159() { - Matrix3d m = Matrix3d::Random().selfadjointView<Lower>(); + Matrix3d m = Matrix3d::Random().selfadjointView<Lower>(); + EIGEN_UNUSED_VARIABLE(m) } void test_selfadjoint() @@ -68,6 +69,8 @@ void test_selfadjoint() CALL_SUBTEST_3( selfadjoint(Matrix3cf()) ); CALL_SUBTEST_4( selfadjoint(MatrixXcd(s,s)) ); CALL_SUBTEST_5( selfadjoint(Matrix<float,Dynamic,Dynamic,RowMajor>(s, s)) ); + + EIGEN_UNUSED_VARIABLE(s) } CALL_SUBTEST_1( bug_159() ); diff --git a/test/triangular.cpp b/test/triangular.cpp index 3210761c1..4db8f8482 100644 --- a/test/triangular.cpp +++ b/test/triangular.cpp @@ -42,16 +42,8 @@ template<typename MatrixType> void triangular_square(const MatrixType& m) m3(rows, cols), m4(rows, cols), r1(rows, cols), - r2(rows, cols), - mzero = MatrixType::Zero(rows, cols), - mones = MatrixType::Ones(rows, cols), - identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Identity(rows, rows), - square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Random(rows, rows); - VectorType v1 = VectorType::Random(rows), - v2 = VectorType::Random(rows), - vzero = VectorType::Zero(rows); + r2(rows, cols); + VectorType v2 = VectorType::Random(rows); MatrixType m1up = m1.template triangularView<Upper>(); MatrixType m2up = m2.template triangularView<Upper>(); @@ -158,16 +150,7 @@ template<typename MatrixType> void triangular_rect(const MatrixType& m) m3(rows, cols), m4(rows, cols), r1(rows, cols), - r2(rows, cols), - mzero = MatrixType::Zero(rows, cols), - mones = MatrixType::Ones(rows, cols); - RMatrixType identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Identity(rows, rows), - square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Random(rows, rows); - VectorType v1 = VectorType::Random(rows), - v2 = VectorType::Random(rows), - vzero = VectorType::Zero(rows); + r2(rows, cols); MatrixType m1up = m1.template triangularView<Upper>(); MatrixType m2up = m2.template triangularView<Upper>(); @@ -237,7 +220,8 @@ template<typename MatrixType> void triangular_rect(const MatrixType& m) void bug_159() { - Matrix3d m = Matrix3d::Random().triangularView<Lower>(); + Matrix3d m = Matrix3d::Random().triangularView<Lower>(); + EIGEN_UNUSED_VARIABLE(m) } void test_triangular() |