AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
Assigner.hpp
1#pragma once
2
3namespace AMDiS
4{
5 namespace Assigner
6 {
7 struct assign
8 {
9 template <class T, class S>
10 constexpr void operator()(T const& from, S&& to) const
11 {
12 to = from;
13 }
14 };
15
17 {
18 template <class T, class S>
19 constexpr void operator()(T const& from, S&& to) const
20 {
21 to += from;
22 }
23 };
24
26 {
27 template <class T, class S>
28 constexpr void operator()(T const& from, S&& to) const
29 {
30 to -= from;
31 }
32 };
33
35 {
36 template <class T, class S>
37 constexpr void operator()(T const& from, S&& to) const
38 {
39 to *= from;
40 }
41 };
42
44 {
45 template <class T, class S>
46 constexpr void operator()(T const& from, S&& to) const
47 {
48 to /= from;
49 }
50 };
51
52 } // end namespcae Assigner
53} // end namespace AMDiS
Definition: Assigner.hpp:8
Definition: Assigner.hpp:44
Definition: Assigner.hpp:26
Definition: Assigner.hpp:35
Definition: Assigner.hpp:17