Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Sacado_Fad_Exp_Ops_Fwd.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Sacado Package
5 // Copyright (2006) Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
25 // (etphipp@sandia.gov).
26 //
27 // ***********************************************************************
28 // @HEADER
29 
30 #ifndef SACADO_EXP_FAD_OPS_FWD_HPP
31 #define SACADO_EXP_FAD_OPS_FWD_HPP
32 
33 #include <type_traits>
34 
35 namespace Sacado {
36 
37  template <typename T> struct IsSimdType;
38  template <typename T> struct IsFad;
39  template <typename T> struct ValueType;
40 
41  namespace Fad {
42  namespace Exp {
43 
44  template <typename T, typename E> class UnaryPlusOp;
45  template <typename T, typename E> class UnaryMinusOp;
46  template <typename T, typename E> class ExpOp;
47  template <typename T, typename E> class LogOp;
48  template <typename T, typename E> class Log10Op;
49  template <typename T, typename E> class SqrtOp;
50  template <typename T, typename E> class CosOp;
51  template <typename T, typename E> class SinOp;
52  template <typename T, typename E> class TanOp;
53  template <typename T, typename E> class ACosOp;
54  template <typename T, typename E> class ASinOp;
55  template <typename T, typename E> class ATanOp;
56  template <typename T, typename E> class CoshOp;
57  template <typename T, typename E> class SinhOp;
58  template <typename T, typename E> class TanhOp;
59  template <typename T, typename E> class ACoshOp;
60  template <typename T, typename E> class ASinhOp;
61  template <typename T, typename E> class ATanhOp;
62  template <typename T, typename E> class AbsOp;
63  template <typename T, typename E> class FAbsOp;
64  template <typename T, typename E> class CbrtOp;
66  class SafeSqrtOp;
67 
68  template <typename T1, typename T2, bool, bool, typename E>
69  class AdditionOp;
70  template <typename T1, typename T2, bool, bool, typename E>
72  template <typename T1, typename T2, bool, bool, typename E>
74  template <typename T1, typename T2, bool, bool, typename E>
75  class DivisionOp;
76  template <typename T1, typename T2, bool, bool, typename E> class Atan2Op;
77  template <typename T1, typename T2, bool, bool, typename E> class MaxOp;
78  template <typename T1, typename T2, bool, bool, typename E> class MinOp;
79 
80  namespace PowerImpl {
81  struct Simd {};
82  struct Nested {};
83  struct NestedSimd {};
84  struct Scalar {};
85 
86  template <typename T1, typename T2>
87  struct Selector {
88  static constexpr bool is_simd =
90  static constexpr bool is_fad =
93  typedef typename std::conditional<
94  is_simd && is_fad,
95  NestedSimd,
96  typename std::conditional<
97  is_simd,
98  Simd,
99  typename std::conditional<
100  is_fad,
101  Nested,
102  Scalar>::type
103  >::type
105  };
106  }
107  template <typename T1, typename T2, bool, bool, typename E,
108  typename Impl = typename PowerImpl::Selector<T1,T2>::type >
109  class PowerOp;
110 
111  } // namespace Exp
112  } // namespace Fad
113 
114 } // namespace Sacado
115 
116 #endif // SACADO_FAD_EXPRESSION_HPP
std::conditional< is_simd &&is_fad, NestedSimd, typename std::conditional< is_simd, Simd, typename std::conditional< is_fad, Nested, Scalar >::type >::type >::type type
Base template specification for whether a type is a Fad type.
Base template specification for IsSimdType.
#define T2(r, f)
Definition: Sacado_rad.hpp:578
#define T1(r, f)
Definition: Sacado_rad.hpp:603
int value
Base template specification for ValueType.