Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62012 - sandbox/numeric_bindings/libs/numeric/bindings/lapack/test
From: thomas.klimpel_at_[hidden]
Date: 2010-05-15 19:38:47


Author: klimpel
Date: 2010-05-15 19:38:47 EDT (Sat, 15 May 2010)
New Revision: 62012
URL: http://svn.boost.org/trac/boost/changeset/62012

Log:
try to better localize matlib (macro TEST_MATLIB_XXX) dependent code
Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_gesv2.cc | 41 +++++++++++++++++++++------------------
   1 files changed, 22 insertions(+), 19 deletions(-)

Modified: sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_gesv2.cc
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_gesv2.cc (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_gesv2.cc 2010-05-15 19:38:47 EDT (Sat, 15 May 2010)
@@ -1,6 +1,3 @@
-#if !defined(TEST_MATLIB_UBLAS) && !defined(TEST_MATLIB_GLAS) && !defined(TEST_MATLIB_MTL) && !defined(TEST_MATLIB_EIGEN)
-#define TEST_MATLIB_UBLAS
-#endif
 
 // solving A * X = B
 // using driver function gesv()
@@ -10,41 +7,47 @@
 #include <vector>
 #include <boost/numeric/bindings/lapack/driver/gesv.hpp>
 #include <boost/numeric/bindings/std/vector.hpp>
-#if defined(TEST_MATLIB_UBLAS)
-#include <boost/numeric/bindings/ublas/matrix.hpp>
-#include <boost/numeric/ublas/matrix_proxy.hpp>
-#elif defined(TEST_MATLIB_GLAS)
-#include <boost/numeric/bindings/glas/dense_matrix.hpp>
-#include <glas/toolbox/la/algorithm/operators.hpp>
-#elif defined(TEST_MATLIB_MTL)
-#include <boost/numeric/bindings/mtl/dense2D.hpp>
-#include <boost/numeric/mtl/operation/operators.hpp>
-#elif defined(TEST_MATLIB_EIGEN)
-#include <boost/numeric/bindings/eigen/matrix.hpp>
+
+#if !defined(TEST_MATLIB_UBLAS) && !defined(TEST_MATLIB_GLAS) && !defined(TEST_MATLIB_MTL) && !defined(TEST_MATLIB_EIGEN)
+#define TEST_MATLIB_UBLAS
 #endif
-#include "utils.h"
 
-namespace lapack = boost::numeric::bindings::lapack;
-namespace bindings = boost::numeric::bindings;
 #if defined(TEST_MATLIB_UBLAS)
+
+#include <boost/numeric/bindings/ublas/matrix.hpp>
+#include <boost/numeric/ublas/matrix_proxy.hpp>
 namespace ublas = boost::numeric::ublas;
 typedef ublas::matrix<double, ublas::column_major> m_t;
 typedef std::size_t size_type;
+
 #elif defined(TEST_MATLIB_GLAS)
+
+#include <boost/numeric/bindings/glas/dense_matrix.hpp>
+#include <glas/toolbox/la/algorithm/operators.hpp>
 using namespace glas::la;
 typedef glas::dense_matrix<double, glas::column_orientation> m_t;
 typedef std::ptrdiff_t size_type;
+
 #elif defined(TEST_MATLIB_MTL)
+
+#include <boost/numeric/bindings/mtl/dense2D.hpp>
+#include <boost/numeric/mtl/operation/operators.hpp>
 typedef mtl::dense2D<double, mtl::matrix::parameters<mtl::tag::col_major> > m_t;
 typedef std::ptrdiff_t size_type;
+
 #elif defined(TEST_MATLIB_EIGEN)
+
+#include <boost/numeric/bindings/eigen/matrix.hpp>
 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> m_t;
 typedef int size_type;
+
 #endif
 
+#include "utils.h"
+namespace lapack = boost::numeric::bindings::lapack;
+namespace bindings = boost::numeric::bindings;
 using std::cout;
-using std::endl;
-
+using std::endl;
 
 int main() {
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk