From 486a856d6bb14bad22e55b3d87f80a69725aa3dd Mon Sep 17 00:00:00 2001 From: Brendan Fabeny Date: Sun, 1 Jan 2012 17:34:49 +0000 Subject: update to 2.1.2.23; add LICENSE and test targets; respect CXX and CXXFLAGS; fix the build with lang/gcc46 (refactored libstdc++ headers) and clang (stricter unqualified lookups in templates); install examples --- math/mtl/files/patch-test__src__algo_test.h | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 math/mtl/files/patch-test__src__algo_test.h (limited to 'math/mtl/files/patch-test__src__algo_test.h') diff --git a/math/mtl/files/patch-test__src__algo_test.h b/math/mtl/files/patch-test__src__algo_test.h new file mode 100644 index 000000000000..69d901ccdb2c --- /dev/null +++ b/math/mtl/files/patch-test__src__algo_test.h @@ -0,0 +1,60 @@ +--- test/src/algo_test.h.orig 2007-04-10 16:03:10.000000000 -0400 ++++ test/src/algo_test.h 2012-01-01 08:04:04.000000000 -0500 +@@ -8,6 +8,28 @@ + using mtl::dense1D; + + template ++void ++set_diagonal_test(std::string test_name, Matrix& A, bool& success) ++{ ++ if (A.is_unit()) { ++ std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl; ++ return; ++ } ++ typedef typename mtl::matrix_traits::value_type T; ++ typedef typename mtl::matrix_traits::size_type Int; ++ // set_diagnal ++ Int i; ++ mtl::set_diagonal(A, T(1)); ++ ++ for (i = 0; i < A.nrows() && i < A.ncols(); ++i) ++ if (A(i,i) != T(1)) { ++ std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl; ++ success = false; ++ break; ++ } ++} ++ ++template + bool + mat_algo_test(Matrix& A, std::string test_name) + { +@@ -110,28 +132,6 @@ + return success; + } + +-template +-void +-set_diagonal_test(std::string test_name, Matrix& A, bool& success) +-{ +- if (A.is_unit()) { +- std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl; +- return; +- } +- typedef typename mtl::matrix_traits::value_type T; +- typedef typename mtl::matrix_traits::size_type Int; +- // set_diagnal +- Int i; +- mtl::set_diagonal(A, T(1)); +- +- for (i = 0; i < A.nrows() && i < A.ncols(); ++i) +- if (A(i,i) != T(1)) { +- std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl; +- success = false; +- break; +- } +-} +- + template + inline void + fill_matrix(Mat& A, int /*sub*/, int /*super*/, mtl::rectangle_tag) -- cgit v1.2.3