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 //
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_FAD_GENERALFADEXPR_HPP
31 #define SACADO_FAD_GENERALFADEXPR_HPP
32 
34 
35 namespace Sacado {
36 
37  namespace Fad {
38 
40 
45  template <typename T, typename Storage>
46  class Expr< GeneralFad<T,Storage> > : public GeneralFad<T,Storage> {
47 
48  public:
49 
52 
55 
58 
61  Expr() :
62  GeneralFad<T,Storage>() {}
63 
65 
68  template <typename S>
71  GeneralFad<T,Storage>(x) {}
72 
74 
78  Expr(const int sz, const T & x, const DerivInit zero_out = InitDerivArray) :
79  GeneralFad<T,Storage>(sz,x,zero_out) {}
80 
82 
88  Expr(const int sz, const int i, const T & x) :
89  GeneralFad<T,Storage>(sz,i,x) {}
90 
93  Expr(const Storage& s) :
94  GeneralFad<T,Storage>(s) {}
95 
98  Expr(const Expr& x) :
99  GeneralFad<T,Storage>(static_cast<const GeneralFad<T,Storage>&>(x)) {}
100 
102  template <typename S>
105  GeneralFad<T,Storage>(x) {}
106 
109  ~Expr() {}
110 
111  }; // class Expr<GeneralFad>
112 
113  } // namespace Fad
114 
115 } // namespace Sacado
116 
117 #include "Sacado_Fad_Ops.hpp"
118 
119 #endif // SACADO_FAD_GENERALFADEXPR_HPP
Wrapper for a generic expression template.
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.
KOKKOS_INLINE_FUNCTION Expr(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x.
#define SACADO_ENABLE_EXPR_CTOR_DECL
KOKKOS_INLINE_FUNCTION Expr(const int sz, const T &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
#define KOKKOS_INLINE_FUNCTION
#define T
Definition: Sacado_rad.hpp:573
KOKKOS_INLINE_FUNCTION Expr(const int sz, const int i, const T &x)
Constructor with size sz, index i, and value x.
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.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
KOKKOS_INLINE_FUNCTION Expr(const Expr &x)
Copy constructor.
KOKKOS_INLINE_FUNCTION Expr(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
Initialize the derivative array.
BaseExpr< GeneralFad< T, Storage > >::type base_expr_type
Typename of base-expressions.
KOKKOS_INLINE_FUNCTION Expr(const Storage &s)
Constructor with supplied storage s.
KOKKOS_INLINE_FUNCTION Expr()
Default constructor.
Forward-mode AD class templated on the storage for the derivative array.