Intrepid2
Intrepid2_DataFunctors.hpp
Go to the documentation of this file.
1 //
2 // Intrepid2_DataFunctors.hpp
3 // Trilinos
4 //
5 // Created by Roberts, Nathan V on 5/31/23.
6 //
7 
8 #ifndef Intrepid2_DataFunctors_hpp
9 #define Intrepid2_DataFunctors_hpp
10 
16 namespace Intrepid2 {
17 
18 template<class Scalar>
20 {
21  KOKKOS_INLINE_FUNCTION
22  Scalar operator()(const Scalar &a, const Scalar &b) const
23  {
24  return a + b;
25  }
26 };
27 
28 template<class Scalar>
30 {
31  KOKKOS_INLINE_FUNCTION
32  Scalar operator()(const Scalar &a, const Scalar &b) const
33  {
34  return a - b;
35  }
36 };
37 
38 template<class Scalar>
40 {
41  KOKKOS_INLINE_FUNCTION
42  Scalar operator()(const Scalar &a, const Scalar &b) const
43  {
44  return a * b;
45  }
46 };
47 
48 template<class Scalar>
50 {
51  KOKKOS_INLINE_FUNCTION
52  Scalar operator()(const Scalar &a, const Scalar &b) const
53  {
54  return a / b;
55  }
56 };
57 
58 } // end namespace Intrepid2
59 
60 #endif /* Intrepid2_DataFunctors_hpp */