File indexing completed on 2025-01-18 09:42:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VIENNACL_VIENNACL_RESIZE_HPP_INCLUDED
0020 #define BOOST_NUMERIC_ODEINT_EXTERNAL_VIENNACL_VIENNACL_RESIZE_HPP_INCLUDED
0021
0022 #include <viennacl/vector.hpp>
0023
0024 #include <boost/numeric/odeint/util/is_resizeable.hpp>
0025 #include <boost/numeric/odeint/util/resize.hpp>
0026 #include <boost/numeric/odeint/util/same_size.hpp>
0027
0028 namespace boost {
0029 namespace numeric {
0030 namespace odeint {
0031
0032
0033
0034
0035
0036
0037 template< typename T >
0038 struct is_resizeable< viennacl::vector< T > > : boost::true_type { };
0039
0040 template< typename T >
0041 struct resize_impl< viennacl::vector< T > , viennacl::vector< T > >
0042 {
0043 static void resize( viennacl::vector< T > &x1 , const viennacl::vector< T > &x2 )
0044 {
0045 x1.resize( x2.size() , false );
0046 }
0047 };
0048
0049 template< typename T >
0050 struct same_size_impl< viennacl::vector< T > , viennacl::vector< T > >
0051 {
0052 static bool same_size( const viennacl::vector< T > &x1 , const viennacl::vector< T > &x2 )
0053 {
0054 return x1.size() == x2.size();
0055 }
0056 };
0057
0058
0059
0060 }
0061 }
0062 }
0063
0064
0065
0066 #endif