]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/numeric/odeint/include/boost/numeric/odeint/external/mtl4/mtl4_algebra_dispatcher.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / numeric / odeint / include / boost / numeric / odeint / external / mtl4 / mtl4_algebra_dispatcher.hpp
CommitLineData
7c673cae
FG
1/*
2 [auto_generated]
3 boost/numeric/odeint/external/mtl4/mtl4_algebra_dispatcher.hpp
4
5 [begin_description]
6 specialization of the algebra dispatcher for mtl4
7 [end_description]
8
9 Copyright 2013 Karsten Ahnert
10 Copyright 2013 Mario Mulansky
11
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
15 */
16
17#ifndef BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_HPP_INCLUDED
18#define BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_HPP_INCLUDED
19
20#include <boost/numeric/mtl/mtl.hpp>
21
22#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
23#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
24
25namespace boost {
26namespace numeric {
27namespace odeint {
28
29template<typename Value, typename Parameters>
30struct algebra_dispatcher< mtl::dense_vector< Value , Parameters > >
31{
32 typedef vector_space_algebra algebra_type;
33};
34
35template<typename Value, typename Parameters>
36struct algebra_dispatcher< mtl::dense2D< Value , Parameters > >
37{
38 typedef vector_space_algebra algebra_type;
39};
40
41template<typename Value , size_t BitMask , typename Parameters>
42struct algebra_dispatcher< mtl::morton_dense< Value , BitMask, Parameters > >
43{
44 typedef vector_space_algebra algebra_type;
45};
46
47template<typename Value, typename Parameters>
48struct algebra_dispatcher< mtl::compressed2D< Value , Parameters > >
49{
50 typedef vector_space_algebra algebra_type;
51};
52
53// specialization of infinity norm calculation
54
55template<typename Value, typename Parameters>
56struct vector_space_norm_inf< mtl::dense_vector< Value , Parameters > >
57{
58 typedef Value result_type;
59 Value operator()( const mtl::dense_vector< Value , Parameters > &x ) const
60 {
61 return mtl::infinity_norm(x);
62 }
63};
64
65template<typename Value, typename Parameters>
66struct vector_space_norm_inf< mtl::dense2D< Value , Parameters > >
67{
68 typedef Value result_type;
69 Value operator()( const mtl::dense2D< Value , Parameters > &x ) const
70 {
71 return mtl::infinity_norm(x);
72 }
73};
74
75template<typename Value , size_t BitMask , typename Parameters>
76struct vector_space_norm_inf< mtl::morton_dense< Value , BitMask , Parameters > >
77{
78 typedef Value result_type;
79 Value operator()( const mtl::morton_dense< Value , BitMask , Parameters > &x ) const
80 {
81 return mtl::infinity_norm(x);
82 }
83};
84
85template<typename Value, typename Parameters>
86struct vector_space_norm_inf< mtl::compressed2D< Value , Parameters > >
87{
88 typedef Value result_type;
89 Value operator()( const mtl::compressed2D< Value , Parameters > &x ) const
90 {
91 return mtl::infinity_norm(x);
92 }
93};
94
95}
96}
97}
98
99#endif // BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_INCLUDED