File indexing completed on 2025-01-18 09:42:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
0020
0021 #include <boost/numeric/odeint/util/is_resizeable.hpp>
0022 #include <boost/numeric/odeint/util/resize.hpp>
0023 #include <boost/numeric/odeint/util/same_size.hpp>
0024
0025 #include <blaze/math/dense/DynamicVector.h>
0026
0027 namespace boost {
0028 namespace numeric {
0029 namespace odeint {
0030
0031 template< typename T , bool TF >
0032 struct is_resizeable< blaze::DynamicVector< T , TF > >
0033 {
0034 typedef boost::true_type type;
0035 const static bool value = type::value;
0036 };
0037
0038 template< typename T1 , bool TF1, typename T2 , bool TF2 >
0039 struct same_size_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
0040 {
0041 static bool same_size( const blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
0042 {
0043 return x1.size() == x2.size();
0044 }
0045 };
0046
0047 template< typename T1 , bool TF1, typename T2 , bool TF2 >
0048 struct resize_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
0049 {
0050 static void resize( blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
0051 {
0052 x1.resize( x2.size() );
0053 }
0054 };
0055
0056
0057 }
0058 }
0059 }
0060
0061
0062 #endif