diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index a4fba292..17fc8859 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -19,6 +19,18 @@ #include +#include +#include +#include +#ifdef BOOST_UBLAS_USE_DUFF_DEVICE +#include +#endif +#ifdef BOOST_UBLAS_USE_SIMD +#include +#else +namespace boost { namespace numeric { namespace ublas { namespace raw { +}}}} +#endif #ifdef BOOST_UBLAS_HAVE_BINDINGS #include #include @@ -26,11 +38,7 @@ #include #endif -#include -#include -#include -#include -#include + namespace boost { namespace numeric { namespace ublas { @@ -649,6 +657,7 @@ namespace boost { namespace numeric { namespace ublas { const vector_expression &e2, concrete_tag) const { #ifndef BOOST_UBLAS_HAVE_BINDINGS + using namespace raw; size_type size (BOOST_UBLAS_SAME (e1 ().size (), e2 ().size ())); const T1 *data1 = data_const (e1 ()); const T2 *data2 = data_const (e2 ()); @@ -806,6 +815,7 @@ namespace boost { namespace numeric { namespace ublas { const vector_expression &e2, size_type i, concrete_tag) const { #ifndef BOOST_UBLAS_HAVE_BINDINGS + using namespace raw; size_type size = BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size ()); const T1 *data1 = data_const (e1 ()) + i * stride1 (e1 ()); const T2 *data2 = data_const (e2 ()); @@ -987,6 +997,7 @@ namespace boost { namespace numeric { namespace ublas { const matrix_expression &e2, size_type i, concrete_tag) const { #ifndef BOOST_UBLAS_HAVE_BINDINGS + using namespace raw; size_type size = BOOST_UBLAS_SAME (e1 ().size (), e2 ().size1 ()); const T1 *data1 = data_const (e1 ()); const T2 *data2 = data_const (e2 ()) + i * stride2 (e2 ()); @@ -1177,6 +1188,7 @@ namespace boost { namespace numeric { namespace ublas { const matrix_expression &e2, size_type i, size_type j, concrete_tag) const { #ifndef BOOST_UBLAS_HAVE_BINDINGS + using namespace raw; size_type size = BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size1 ()); const T1 *data1 = data_const (e1 ()) + i * stride1 (e1 ()); const T2 *data2 = data_const (e2 ()) + j * stride2 (e2 ()); diff --git a/include/boost/numeric/ublas/raw.hpp b/include/boost/numeric/ublas/raw.hpp index cf06ce61..087f3695 100755 --- a/include/boost/numeric/ublas/raw.hpp +++ b/include/boost/numeric/ublas/raw.hpp @@ -15,7 +15,7 @@ #ifndef BOOST_UBLAS_RAW_H #define BOOST_UBLAS_RAW_H -namespace boost { namespace numeric { namespace ublas { +namespace boost { namespace numeric { namespace ublas { namespace raw { // MSVC 6.0 gets confused by the forward declarations. #if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1300) @@ -1020,6 +1020,6 @@ namespace boost { namespace numeric { namespace ublas { return m.start1() * stride1( m.data () ) + m.start2() * stride2( m.data () ) ; } -}}} +}}}} #endif