Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:51

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/external/mtl4/mtl4_algebra_dispatcher.hpp
0004 
0005  [begin_description]
0006  specialization of the algebra dispatcher for mtl4
0007  [end_description]
0008 
0009  Copyright 2013 Karsten Ahnert
0010  Copyright 2013 Mario Mulansky
0011 
0012  Distributed under the Boost Software License, Version 1.0.
0013  (See accompanying file LICENSE_1_0.txt or
0014  copy at http://www.boost.org/LICENSE_1_0.txt)
0015  */
0016 
0017 #ifndef BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_HPP_INCLUDED
0018 #define BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_HPP_INCLUDED
0019 
0020 #include <boost/numeric/mtl/mtl.hpp>
0021 
0022 #include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
0023 #include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
0024 
0025 namespace boost {
0026 namespace numeric {
0027 namespace odeint {
0028 
0029 template<typename Value, typename Parameters>
0030 struct algebra_dispatcher< mtl::dense_vector< Value , Parameters > >
0031 {
0032     typedef vector_space_algebra algebra_type;
0033 };
0034 
0035 template<typename Value, typename Parameters>
0036 struct algebra_dispatcher< mtl::dense2D< Value , Parameters > >
0037 {
0038     typedef vector_space_algebra algebra_type;
0039 };
0040 
0041 template<typename Value , size_t BitMask , typename Parameters>
0042 struct algebra_dispatcher< mtl::morton_dense< Value , BitMask, Parameters > >
0043 {
0044     typedef vector_space_algebra algebra_type;
0045 };
0046 
0047 template<typename Value, typename Parameters>
0048 struct algebra_dispatcher< mtl::compressed2D< Value , Parameters > >
0049 {
0050     typedef vector_space_algebra algebra_type;
0051 };
0052 
0053 // specialization of infinity norm calculation
0054 
0055 template<typename Value, typename Parameters>
0056 struct vector_space_norm_inf< mtl::dense_vector< Value , Parameters > >
0057 {
0058     typedef Value result_type;
0059     Value operator()( const mtl::dense_vector< Value , Parameters > &x ) const
0060     {
0061         return mtl::infinity_norm(x);
0062     }
0063 };
0064 
0065 template<typename Value, typename Parameters>
0066 struct vector_space_norm_inf< mtl::dense2D< Value , Parameters > >
0067 {
0068     typedef Value result_type;
0069     Value operator()( const mtl::dense2D< Value , Parameters > &x ) const
0070     {
0071         return mtl::infinity_norm(x);
0072     }
0073 };
0074 
0075 template<typename Value , size_t BitMask , typename Parameters>
0076 struct vector_space_norm_inf< mtl::morton_dense< Value , BitMask , Parameters > >
0077 {
0078     typedef Value result_type;
0079     Value operator()( const mtl::morton_dense< Value , BitMask , Parameters > &x ) const
0080     {
0081         return mtl::infinity_norm(x);
0082     }
0083 };
0084 
0085 template<typename Value, typename Parameters>
0086 struct vector_space_norm_inf< mtl::compressed2D< Value , Parameters > >
0087 {
0088     typedef Value result_type;
0089     Value operator()( const mtl::compressed2D< Value , Parameters > &x ) const
0090     {
0091         return mtl::infinity_norm(x);
0092     }
0093 };
0094 
0095 }
0096 }
0097 }
0098 
0099 #endif // BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_INCLUDED