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_GeneralFadExpr.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Sacado Package
4 //
5 // Copyright 2006 NTESS and the Sacado contributors.
6 // SPDX-License-Identifier: LGPL-2.1-or-later
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef SACADO_FAD_GENERALFADEXPR_HPP
11 #define SACADO_FAD_GENERALFADEXPR_HPP
12 
14 
15 namespace Sacado {
16 
17  namespace Fad {
18 
20 
25  template <typename T, typename Storage>
26  class Expr< GeneralFad<T,Storage> > : public GeneralFad<T,Storage> {
27 
28  public:
29 
32 
35 
38 
41  Expr() :
42  GeneralFad<T,Storage>() {}
43 
45 
48  template <typename S>
51  GeneralFad<T,Storage>(x) {}
52 
54 
58  Expr(const int sz, const T & x, const DerivInit zero_out = InitDerivArray) :
59  GeneralFad<T,Storage>(sz,x,zero_out) {}
60 
62 
68  Expr(const int sz, const int i, const T & x) :
69  GeneralFad<T,Storage>(sz,i,x) {}
70 
73  Expr(const Storage& s) :
74  GeneralFad<T,Storage>(s) {}
75 
78  Expr(const Expr& x) :
79  GeneralFad<T,Storage>(static_cast<const GeneralFad<T,Storage>&>(x)) {}
80 
82  template <typename S>
85  GeneralFad<T,Storage>(x) {}
86 
89  ~Expr() {}
90 
91  }; // class Expr<GeneralFad>
92 
93  } // namespace Fad
94 
95 } // namespace Sacado
96 
97 #include "Sacado_Fad_Ops.hpp"
98 
99 #endif // SACADO_FAD_GENERALFADEXPR_HPP
Wrapper for a generic expression template.
SACADO_INLINE_FUNCTION Expr(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
SACADO_INLINE_FUNCTION Expr()
Default constructor.
SACADO_INLINE_FUNCTION Expr(const int sz, const int i, const T &x)
Constructor with size sz, index i, and value x.
ScalarType< value_type >::type scalar_type
Typename of scalar&#39;s (which may be different from T)
#define SACADO_ENABLE_VALUE_CTOR_DECL
RemoveConst< T >::type value_type
Typename of values.
SACADO_INLINE_FUNCTION Expr(const Expr &x)
Copy constructor.
#define SACADO_ENABLE_EXPR_CTOR_DECL
#define T
Definition: Sacado_rad.hpp:553
GeneralFad< T, Storage >::value_type value_type
Typename of values.
GeneralFad< T, Storage >::scalar_type scalar_type
Typename of scalar&#39;s (which may be different from value_type)
Meta-function for determining concrete base expression.
SACADO_INLINE_FUNCTION Expr(const int sz, const T &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
SACADO_INLINE_FUNCTION Expr(const Storage &s)
Constructor with supplied storage s.
Initialize the derivative array.
BaseExpr< GeneralFad< T, Storage > >::type base_expr_type
Typename of base-expressions.
SACADO_INLINE_FUNCTION Expr(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x.
#define SACADO_INLINE_FUNCTION
Forward-mode AD class templated on the storage for the derivative array.