|
Boost-Commit : |
From: karl.meerbergen_at_[hidden]
Date: 2007-10-23 03:59:38
Author: karlmeerbergen
Date: 2007-10-23 03:59:37 EDT (Tue, 23 Oct 2007)
New Revision: 40343
URL: http://svn.boost.org/trac/boost/changeset/40343
Log:
bug for complex value_type
Text files modified:
sandbox/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Modified: sandbox/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp (original)
+++ sandbox/boost/numeric/bindings/mumps/mumps_driver_4_6_4.hpp 2007-10-23 03:59:37 EDT (Tue, 23 Oct 2007)
@@ -163,6 +163,11 @@
rows = const_cast<int*>( boost::numeric::bindings::traits::spmatrix_index2_storage( m ) ) ;
}
+ // Pointer Cast
+ float* cast_2_mumps( float* p ) { return p ; }
+ double* cast_2_mumps( double* p ) { return p ; }
+ mumps_double_complex* cast_2_mumps( std::complex<double>* p ) { return reinterpret_cast<mumps_double_complex*>( p ) ; }
+ mumps_complex* cast_2_mumps( std::complex<float>* p ) { return reinterpret_cast<mumps_complex*>( p ) ; }
} // namespace detail
@@ -221,8 +226,8 @@
//
template <typename M>
void matrix_value_data( mumps<M>& data, M& m ) {
- data.a = boost::numeric::bindings::traits::spmatrix_value_storage( m ) ;
- data.a_loc = boost::numeric::bindings::traits::spmatrix_value_storage( m ) ;
+ data.a = detail::cast_2_mumps( boost::numeric::bindings::traits::spmatrix_value_storage( m ) ) ;
+ data.a_loc = detail::cast_2_mumps( boost::numeric::bindings::traits::spmatrix_value_storage( m ) ) ;
} // matrix_value_data()
@@ -232,7 +237,7 @@
//
template <typename M, typename X>
void rhs_sol_value_data( mumps<M>& data, X& x ) {
- data.rhs = boost::numeric::bindings::traits::matrix_storage( x ) ;
+ data.rhs = detail::cast_2_mumps( boost::numeric::bindings::traits::matrix_storage( x ) ) ;
data.nrhs = boost::numeric::bindings::traits::matrix_size2( x ) ;
data.lrhs = boost::numeric::bindings::traits::leading_dimension( x ) ;
} // matrix_rhs_sol_value_data()
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