blaze_resize.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #include <type_traits>
  20. namespace boost {
  21. namespace numeric {
  22. namespace odeint {
  23. template< typename T , bool TF >
  24. struct is_resizeable< blaze::DynamicVector< T , TF > >
  25. {
  26. typedef std::true_type type;
  27. const static bool value = type::value;
  28. };
  29. template< typename T1 , bool TF1, typename T2 , bool TF2 >
  30. struct same_size_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
  31. {
  32. static bool same_size( const blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
  33. {
  34. return x1.size() == x2.size();
  35. }
  36. };
  37. template< typename T1 , bool TF1, typename T2 , bool TF2 >
  38. struct resize_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
  39. {
  40. static void resize( blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
  41. {
  42. x1.resize( x2.size() );
  43. }
  44. };
  45. } // namespace odeint
  46. } // namespace numeric
  47. } // namespace boost
  48. #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED