Intrepid2
Intrepid2_DataFunctors.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Intrepid2 Package
4 //
5 // Copyright 2007 NTESS and the Intrepid2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 //
10 // Intrepid2_DataFunctors.hpp
11 // Trilinos
12 //
13 // Created by Roberts, Nathan V on 5/31/23.
14 //
15 
16 #ifndef Intrepid2_DataFunctors_hpp
17 #define Intrepid2_DataFunctors_hpp
18 
24 namespace Intrepid2 {
25 
26 template<class Scalar>
28 {
29  KOKKOS_INLINE_FUNCTION
30  Scalar operator()(const Scalar &a, const Scalar &b) const
31  {
32  return a + b;
33  }
34 };
35 
36 template<class Scalar>
38 {
39  KOKKOS_INLINE_FUNCTION
40  Scalar operator()(const Scalar &a, const Scalar &b) const
41  {
42  return a - b;
43  }
44 };
45 
46 template<class Scalar>
48 {
49  KOKKOS_INLINE_FUNCTION
50  Scalar operator()(const Scalar &a, const Scalar &b) const
51  {
52  return a * b;
53  }
54 };
55 
56 template<class Scalar>
58 {
59  KOKKOS_INLINE_FUNCTION
60  Scalar operator()(const Scalar &a, const Scalar &b) const
61  {
62  return a / b;
63  }
64 };
65 
66 } // end namespace Intrepid2
67 
68 #endif /* Intrepid2_DataFunctors_hpp */