1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VIENNACL_VIENNACL_RESIZE_HPP_INCLUDED
- #define BOOST_NUMERIC_ODEINT_EXTERNAL_VIENNACL_VIENNACL_RESIZE_HPP_INCLUDED
- #include <type_traits>
- #include <viennacl/vector.hpp>
- #include <boost/numeric/odeint/util/is_resizeable.hpp>
- #include <boost/numeric/odeint/util/resize.hpp>
- #include <boost/numeric/odeint/util/same_size.hpp>
- namespace boost {
- namespace numeric {
- namespace odeint {
- template< typename T >
- struct is_resizeable< viennacl::vector< T > > : std::true_type { };
- template< typename T >
- struct resize_impl< viennacl::vector< T > , viennacl::vector< T > >
- {
- static void resize( viennacl::vector< T > &x1 , const viennacl::vector< T > &x2 )
- {
- x1.resize( x2.size() , false );
- }
- };
- template< typename T >
- struct same_size_impl< viennacl::vector< T > , viennacl::vector< T > >
- {
- static bool same_size( const viennacl::vector< T > &x1 , const viennacl::vector< T > &x2 )
- {
- return x1.size() == x2.size();
- }
- };
- }
- }
- }
- #endif
|