File indexing completed on 2025-06-30 08:21:39
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 #include <type_traits>
0028
0029 namespace boost {
0030 namespace numeric {
0031 namespace odeint {
0032
0033 template< typename T , bool TF >
0034 struct is_resizeable< blaze::DynamicVector< T , TF > >
0035 {
0036 typedef std::true_type type;
0037 const static bool value = type::value;
0038 };
0039
0040 template< typename T1 , bool TF1, typename T2 , bool TF2 >
0041 struct same_size_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
0042 {
0043 static bool same_size( const blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
0044 {
0045 return x1.size() == x2.size();
0046 }
0047 };
0048
0049 template< typename T1 , bool TF1, typename T2 , bool TF2 >
0050 struct resize_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
0051 {
0052 static void resize( blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
0053 {
0054 x1.resize( x2.size() );
0055 }
0056 };
0057
0058
0059 }
0060 }
0061 }
0062
0063
0064 #endif