30 #ifndef SACADO_ELRFAD_GENERALFADEXPR_HPP
31 #define SACADO_ELRFAD_GENERALFADEXPR_HPP
45 template <
typename T,
typename Storage>
60 static const int num_args = 1;
63 static const bool is_linear =
true;
94 Expr(
const int sz,
const int i,
const T & x) :
108 template <
typename S>
139 bool isActive2(
int j)
const {
return this->size() > 0; }
156 return this->size() > 0 ? 1 : 0;
162 if (this->size() > 0)
174 #endif // SACADO_ELRFAD_GENERALFADEXPR_HPP
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.
KOKKOS_INLINE_FUNCTION Expr(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
#define SACADO_ENABLE_VALUE_CTOR_DECL
KOKKOS_INLINE_FUNCTION Expr(const Expr &x)
Copy constructor.
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 void computePartials(const T &bar, value_type partials[]) const
Return partials w.r.t. arguments.
#define SACADO_ENABLE_EXPR_CTOR_DECL
KOKKOS_INLINE_FUNCTION Expr(const Storage &s)
Constructor with supplied storage s.
GeneralFad< T, Storage >::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
KOKKOS_INLINE_FUNCTION void getTangents(int i, value_type dots[]) const
Return tangent component i of arguments.
KOKKOS_INLINE_FUNCTION int numActiveArgs() const
#define KOKKOS_INLINE_FUNCTION
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 bool isLinear() const
Return whether expression is linear.
BaseExpr< GeneralFad< T, Storage > >::type base_expr_type
Typename of base-expressions.
KOKKOS_INLINE_FUNCTION Expr()
Default constructor.
KOKKOS_INLINE_FUNCTION const value_type * getDx(int j) const
Get dx array.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
Forward-mode AD class templated on the storage for the derivative array.
KOKKOS_INLINE_FUNCTION bool isActive2(int j) const
Return whether argument is active.
Wrapper for a generic expression template.
expr expr expr fastAccessDx(i)) FAD_UNARYOP_MACRO(exp
Meta-function for determining concrete base expression.
KOKKOS_INLINE_FUNCTION const T & getTangent(int i) const
Return tangent component i of argument Arg.
KOKKOS_INLINE_FUNCTION ~Expr()
Destructor.
KOKKOS_INLINE_FUNCTION void computeActivePartials(const T &bar, value_type *partials) const
Return partials w.r.t. arguments.
KOKKOS_INLINE_FUNCTION bool isActive() const
Return whether argument is active.
Initialize the derivative array.
ScalarType< value_type >::type scalar_type
Typename of scalar's (which may be different from T)
GeneralFad< T, Storage >::value_type value_type
Typename of values.