30 #ifndef SACADO_ELRCACHEFAD_GENERALFADEXPR_HPP
31 #define SACADO_ELRCACHEFAD_GENERALFADEXPR_HPP
37 namespace ELRCacheFad {
46 template <
typename T,
typename Storage>
58 static const int num_args = 1;
61 static const bool is_linear =
true;
92 Expr(
const int sz,
const int i,
const T & x) :
106 template <
typename S>
156 #endif // SACADO_ELRCACHEFAD_GENERALFADEXPR_HPP
KOKKOS_INLINE_FUNCTION bool isLinear() const
Return whether expression is linear.
KOKKOS_INLINE_FUNCTION Expr(const int sz, const T &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
KOKKOS_INLINE_FUNCTION Expr(const int sz, const int i, const T &x)
Constructor with size sz, index i, and value x.
KOKKOS_INLINE_FUNCTION const value_type * getDx(int j) const
Get dx array.
#define SACADO_ENABLE_VALUE_CTOR_DECL
RemoveConst< T >::type value_type
Typename of values.
KOKKOS_INLINE_FUNCTION Expr(const Storage &s)
Constructor with supplied storage s.
KOKKOS_INLINE_FUNCTION T getTangent(int i) const
Return tangent component i of argument Arg.
#define SACADO_ENABLE_EXPR_CTOR_DECL
Meta-function for determining concrete base expression.
KOKKOS_INLINE_FUNCTION ~Expr()
Destructor.
#define KOKKOS_INLINE_FUNCTION
GeneralFad< T, Storage >::scalar_type scalar_type
KOKKOS_INLINE_FUNCTION void computePartials(const T &bar, value_type partials[]) const
Return partials w.r.t. arguments.
KOKKOS_INLINE_FUNCTION Expr()
Default constructor.
KOKKOS_INLINE_FUNCTION bool isActive() const
Return whether argument is active.
Wrapper for a generic expression template.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
KOKKOS_INLINE_FUNCTION void getTangents(int i, value_type dots[]) const
Return tangent component i of arguments.
ScalarType< value_type >::type scalar_type
Typename of scalar's (which may be different from T)
expr expr expr fastAccessDx(i)) FAD_UNARYOP_MACRO(exp
Forward-mode AD class templated on the storage for the derivative array.
BaseExpr< GeneralFad< T, Storage > >::type base_expr_type
Typename of base-expressions.
KOKKOS_INLINE_FUNCTION Expr(const Expr &x)
Copy constructor.
Initialize the derivative array.
GeneralFad< T, Storage >::value_type value_type
KOKKOS_INLINE_FUNCTION Expr(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
KOKKOS_INLINE_FUNCTION Expr(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x.