12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
- #define BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
- #include <boost/numeric/odeint/util/is_resizeable.hpp>
- #include <boost/numeric/odeint/util/resize.hpp>
- #include <boost/numeric/odeint/util/same_size.hpp>
- #include <blaze/math/dense/DynamicVector.h>
- #include <type_traits>
- namespace boost {
- namespace numeric {
- namespace odeint {
- template< typename T , bool TF >
- struct is_resizeable< blaze::DynamicVector< T , TF > >
- {
- typedef std::true_type type;
- const static bool value = type::value;
- };
- template< typename T1 , bool TF1, typename T2 , bool TF2 >
- struct same_size_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
- {
- static bool same_size( const blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
- {
- return x1.size() == x2.size();
- }
- };
- template< typename T1 , bool TF1, typename T2 , bool TF2 >
- struct resize_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
- {
- static void resize( blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
- {
- x1.resize( x2.size() );
- }
- };
- }
- }
- }
- #endif
|