blaze_resize.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. [auto_generated]
  3. boost/numeric/odeint/external/blaze/blaze_resize.hpp
  4. [begin_description]
  5. tba.
  6. [end_description]
  7. Copyright 2009-2012 Karsten Ahnert
  8. Copyright 2009-2012 Mario Mulansky
  9. Distributed under the Boost Software License, Version 1.0.
  10. (See accompanying file LICENSE_1_0.txt or
  11. copy at http://www.boost.org/LICENSE_1_0.txt)
  12. */
  13. #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
  14. #define BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
  15. #include <boost/numeric/odeint/util/is_resizeable.hpp>
  16. #include <boost/numeric/odeint/util/resize.hpp>
  17. #include <boost/numeric/odeint/util/same_size.hpp>
  18. #include <blaze/math/dense/DynamicVector.h>
  19. namespace boost {
  20. namespace numeric {
  21. namespace odeint {
  22. template< typename T , bool TF >
  23. struct is_resizeable< blaze::DynamicVector< T , TF > >
  24. {
  25. typedef boost::true_type type;
  26. const static bool value = type::value;
  27. };
  28. template< typename T1 , bool TF1, typename T2 , bool TF2 >
  29. struct same_size_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
  30. {
  31. static bool same_size( const blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
  32. {
  33. return x1.size() == x2.size();
  34. }
  35. };
  36. template< typename T1 , bool TF1, typename T2 , bool TF2 >
  37. struct resize_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
  38. {
  39. static void resize( blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
  40. {
  41. x1.resize( x2.size() );
  42. }
  43. };
  44. } // namespace odeint
  45. } // namespace numeric
  46. } // namespace boost
  47. #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED