|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62073 - in sandbox/numeric_bindings/boost/numeric/bindings: . eigen glas mtl mumps ublas umfpack
From: thomas.klimpel_at_[hidden]
Date: 2010-05-17 18:36:50
Author: klimpel
Date: 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
New Revision: 62073
URL: http://svn.boost.org/trac/boost/changeset/62073
Log:
- adjusted sparse bindings to index_base.hpp
- added missing typename to data_order.hpp
- use index_base.hpp in umfpack and mumps bindings instead of the inappropriate detail::adaptor_access<...>
- use data_order.hpp in umfpack and mumps bindings instead of detail::property_at<..., tag::data_order>
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/data_order.hpp | 2 +-
sandbox/numeric_bindings/boost/numeric/bindings/eigen/sparsematrix.hpp | 5 ++---
sandbox/numeric_bindings/boost/numeric/bindings/glas/compressed.hpp | 5 ++---
sandbox/numeric_bindings/boost/numeric/bindings/index_base.hpp | 2 +-
sandbox/numeric_bindings/boost/numeric/bindings/mtl/compressed2D.hpp | 5 ++---
sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp | 13 ++++++++-----
sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_8_0.hpp | 9 ++++++---
sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp | 10 ++++------
sandbox/numeric_bindings/boost/numeric/bindings/umfpack/umfpack.hpp | 7 +++++--
9 files changed, 31 insertions(+), 27 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/data_order.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/data_order.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/data_order.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -34,7 +34,7 @@
template< typename T >
typename result_of::data_order<T>::type data_order( const T& ) {
- return result_of::data_order<T>::type();
+ return typename result_of::data_order<T>::type();
}
} // namespace bindings
Modified: sandbox/numeric_bindings/boost/numeric/bindings/eigen/sparsematrix.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/eigen/sparsematrix.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/eigen/sparsematrix.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -46,11 +46,10 @@
mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
mpl::pair< tag::matrix_type, tag::general >,
mpl::pair< tag::data_structure, tag::compressed_sparse >,
- mpl::pair< tag::data_order, data_order >
+ mpl::pair< tag::data_order, data_order >,
+ mpl::pair< tag::index_base, mpl::int_<0> >
> property_map;
- BOOST_STATIC_CONSTANT (std::size_t, index_base = 0);
-
static std::ptrdiff_t size1( const Id& id ) {
return id.rows();
}
Modified: sandbox/numeric_bindings/boost/numeric/bindings/glas/compressed.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/glas/compressed.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/glas/compressed.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -38,11 +38,10 @@
mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
mpl::pair< tag::matrix_type, tag::general >,
mpl::pair< tag::data_structure, tag::compressed_sparse >,
- mpl::pair< tag::data_order, data_order >
+ mpl::pair< tag::data_order, data_order >,
+ mpl::pair< tag::index_base, mpl::int_<IB> >
> property_map;
- BOOST_STATIC_CONSTANT (std::size_t, index_base = IB);
-
static std::ptrdiff_t size1( const Id& id ) {
return id.num_rows();
}
Modified: sandbox/numeric_bindings/boost/numeric/bindings/index_base.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/index_base.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/index_base.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -25,7 +25,7 @@
template< typename T >
typename result_of::index_base<T>::type index_base( const T& ) {
- return result_of::index_base<T>::type();
+ return typename result_of::index_base<T>::type();
}
} // namespace bindings
Modified: sandbox/numeric_bindings/boost/numeric/bindings/mtl/compressed2D.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/mtl/compressed2D.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/mtl/compressed2D.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -42,11 +42,10 @@
mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
mpl::pair< tag::matrix_type, tag::general >,
mpl::pair< tag::data_structure, tag::compressed_sparse >,
- mpl::pair< tag::data_order, data_order >
+ mpl::pair< tag::data_order, data_order >,
+ mpl::pair< tag::index_base, mpl::int_<0> >
> property_map;
- BOOST_STATIC_CONSTANT (std::size_t, index_base = 0);
-
static std::ptrdiff_t size1( const Id& id ) {
return id.num_rows();
}
Modified: sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -16,6 +16,8 @@
#include <boost/numeric/bindings/value_type.hpp>
#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/size.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
+#include <boost/numeric/bindings/index_base.hpp>
#include <boost/static_assert.hpp>
#include <complex>
#include <cassert>
@@ -209,15 +211,16 @@
//
template <typename M>
void matrix_integer_data( mumps<M>& data, M& m ) {
- BOOST_STATIC_ASSERT( (1 == bindings::detail::adaptor_access<M>::index_base) ) ;
+ typedef typename bindings::result_of::index_base<M>::type index_b ;
+ BOOST_STATIC_ASSERT(index_b::value == 1) ;
data.n = bindings::size_row( m ) ;
assert( bindings::size_column( m ) == data.n ) ;
- data.nz = bindings::end_value( m ) - bindings::begin_value( m );
- detail::indices( typename bindings::detail::property_at< M, tag::data_order >::type(), data.irn, data.jcn, m ) ;
+ data.nz = bindings::end_value( m ) - bindings::begin_value( m ) ;
+ detail::indices( bindings::data_order(m), data.irn, data.jcn, m ) ;
- data.nz_loc = bindings::end_value( m ) - bindings::begin_value( m );
- detail::indices( typename bindings::detail::property_at< M, tag::data_order >::type(), data.irn_loc, data.jcn_loc, m ) ;
+ data.nz_loc = bindings::end_value( m ) - bindings::begin_value( m ) ;
+ detail::indices( bindings::data_order(m), data.irn_loc, data.jcn_loc, m ) ;
} // matrix_integer_data()
Modified: sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_8_0.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_8_0.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/mumps/mumps_driver_4_8_0.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -16,6 +16,8 @@
#include <boost/numeric/bindings/value_type.hpp>
#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/size.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
+#include <boost/numeric/bindings/index_base.hpp>
#include <boost/static_assert.hpp>
#include <complex>
#include <cassert>
@@ -216,15 +218,16 @@
//
template <typename M>
void matrix_integer_data( mumps<M>& data, M& m ) {
- BOOST_STATIC_ASSERT( (1 == bindings::detail::adaptor_access<M>::index_base) ) ;
+ typedef typename bindings::result_of::index_base<M>::type index_b ;
+ BOOST_STATIC_ASSERT(index_b::value == 1) ;
data.n = bindings::size_row( m ) ;
assert( bindings::size_column( m ) == data.n ) ;
data.nz = bindings::end_value( m ) - bindings::begin_value( m ) ;
- detail::indices( typename bindings::detail::property_at< M, tag::data_order >::type(), data.irn, data.jcn, m ) ;
+ detail::indices( bindings::data_order(m), data.irn, data.jcn, m ) ;
data.nz_loc = bindings::end_value( m ) - bindings::begin_value( m ) ;
- detail::indices( typename bindings::detail::property_at< M, tag::data_order >::type(), data.irn_loc, data.jcn_loc, m ) ;
+ detail::indices( bindings::data_order(m), data.irn_loc, data.jcn_loc, m ) ;
} // matrix_integer_data()
Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -37,11 +37,10 @@
mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
mpl::pair< tag::matrix_type, tag::general >,
mpl::pair< tag::data_structure, tag::compressed_sparse >,
- mpl::pair< tag::data_order, data_order >
+ mpl::pair< tag::data_order, data_order >,
+ mpl::pair< tag::index_base, mpl::int_<IB> >
> property_map;
- BOOST_STATIC_CONSTANT (std::size_t, index_base = IB);
-
static std::ptrdiff_t size1( const Id& id ) {
return id.size1();
}
@@ -90,11 +89,10 @@
mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
mpl::pair< tag::matrix_type, tag::general >,
mpl::pair< tag::data_structure, tag::coordinate_sparse >,
- mpl::pair< tag::data_order, data_order >
+ mpl::pair< tag::data_order, data_order >,
+ mpl::pair< tag::index_base, mpl::int_<IB> >
> property_map;
- BOOST_STATIC_CONSTANT (std::size_t, index_base = IB);
-
static std::ptrdiff_t size1( const Id& id ) {
return id.size1();
}
Modified: sandbox/numeric_bindings/boost/numeric/bindings/umfpack/umfpack.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/umfpack/umfpack.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/umfpack/umfpack.hpp 2010-05-17 18:36:48 EDT (Mon, 17 May 2010)
@@ -24,6 +24,8 @@
#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/end.hpp>
#include <boost/numeric/bindings/size.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
+#include <boost/numeric/bindings/index_base.hpp>
namespace boost { namespace numeric { namespace bindings { namespace umfpack {
@@ -36,10 +38,11 @@
tag::general
>::value));
BOOST_STATIC_ASSERT((boost::is_same<
- typename bindings::detail::property_at< MatrA, tag::data_order >::type,
+ typename bindings::result_of::data_order<MatrA>::type,
tag::column_major
>::value));
- BOOST_STATIC_ASSERT(bindings::detail::adaptor_access<MatrA>::index_base == 0);
+ typedef typename bindings::result_of::index_base<MatrA>::type index_b;
+ BOOST_STATIC_ASSERT(index_b::value == 0);
typedef typename bindings::detail::property_at<
MatrA, tag::data_structure >::type storage_f;
BOOST_STATIC_ASSERT(
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