File indexing completed on 2025-07-05 08:40:06
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 <type_traits>
0023
0024 #include <viennacl/vector.hpp>
0025
0026 #include <boost/numeric/odeint/util/is_resizeable.hpp>
0027 #include <boost/numeric/odeint/util/resize.hpp>
0028 #include <boost/numeric/odeint/util/same_size.hpp>
0029
0030 namespace boost {
0031 namespace numeric {
0032 namespace odeint {
0033
0034
0035
0036
0037
0038
0039 template< typename T >
0040 struct is_resizeable< viennacl::vector< T > > : std::true_type { };
0041
0042 template< typename T >
0043 struct resize_impl< viennacl::vector< T > , viennacl::vector< T > >
0044 {
0045 static void resize( viennacl::vector< T > &x1 , const viennacl::vector< T > &x2 )
0046 {
0047 x1.resize( x2.size() , false );
0048 }
0049 };
0050
0051 template< typename T >
0052 struct same_size_impl< viennacl::vector< T > , viennacl::vector< T > >
0053 {
0054 static bool same_size( const viennacl::vector< T > &x1 , const viennacl::vector< T > &x2 )
0055 {
0056 return x1.size() == x2.size();
0057 }
0058 };
0059
0060
0061
0062 }
0063 }
0064 }
0065
0066
0067
0068 #endif