Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-11 08:18:04

0001 //==============================================================================
0002 //         Copyright 2014          LRI    UMR 8623 CNRS/Univ Paris Sud XI
0003 //         Copyright 2014          NumScale SAS
0004 //
0005 //          Distributed under the Boost Software License, Version 1.0.
0006 //                 See accompanying file LICENSE.txt or copy at
0007 //                     http://www.boost.org/LICENSE_1_0.txt
0008 //==============================================================================
0009 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED
0010 #define BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED
0011 
0012 #include <nt2/core/container/table/table.hpp>
0013 
0014 #include <boost/numeric/odeint/util/same_size.hpp>
0015 
0016 #include <type_traits>
0017 
0018 namespace boost { namespace numeric { namespace odeint {
0019 
0020 template<typename T, typename S>
0021 struct is_resizeable< nt2::container::table<T,S> >
0022 {
0023   typedef std::true_type type;
0024   static const bool value = type::value;
0025 };
0026 
0027 template<typename T, typename S>
0028 struct same_size_impl< nt2::container::table<T,S>
0029                      , nt2::container::table<T,S>
0030                      >
0031 {
0032   static bool same_size ( const nt2::container::table<T,S> &v1
0033                         , const nt2::container::table<T,S> &v2
0034                         )
0035   {
0036     return v1.extent() == v2.extent();
0037   }
0038 };
0039 
0040 template<typename T, typename S>
0041 struct resize_impl< nt2::container::table<T,S>
0042                   , nt2::container::table<T,S>
0043                   >
0044 {
0045   static void resize ( nt2::container::table<T,S> &v1
0046                      , const nt2::container::table<T,S> &v2
0047                      )
0048   {
0049     v1.resize( v2.extent() );
0050   }
0051 };
0052 } } }
0053 
0054 #endif