|
Ublas : |
Subject: [ublas] Mumps bindings, cast_2_mumps should be inline?
From: Necati Mercan (necati.mercan_at_[hidden])
Date: 2009-03-19 06:59:31
Hi,
I encountered a problem with multiple definitions when I tried to use the Mumps bindings.
I changed cast_2_mumps functions within namespace detail into inline functions. This is in mumps_driver_4_8_0.hpp.
Do I misinterpret something or is there a reason why they shouldn't be inline?
Is there an elegant way to include the mumps bindings within several files without changing the bindings source without running into conflict with the one definition rule? Is there a design reason why they aren't inline?
Cheers,
Necati
-------------------------------------
Index: mumps/mumps_driver_4_8_0.hpp
===================================================================
--- mumps/mumps_driver_4_8_0.hpp (revision 51852)
+++ mumps/mumps_driver_4_8_0.hpp (working copy)
@@ -164,10 +164,10 @@
}
// 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 ) ; }
+ inline float* cast_2_mumps( float* p ) { return p ; }
+ inline double* cast_2_mumps( double* p ) { return p ; }
+ inline mumps_double_complex* cast_2_mumps( std::complex<double>* p ) { return reinterpret_cast<mumps_double_complex*>( p ) ; }
+ inline mumps_complex* cast_2_mumps( std::complex<float>* p ) {
+ return reinterpret_cast<mumps_complex*>( p ) ; }
} // namespace detail
DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
DSL Freundschaftswerbung! *http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a* [http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a]