44 template <
typename ValueT>
46 public Expr< GeneralFad<ValueT,Fad::DynamicStorage<ValueT> > > {
107 DFad(
const int sz,
const int i,
const ValueT & x) :
116 template <
typename S>
128 template <
typename S>
131 GeneralFadType::operator=(v);
138 GeneralFadType::operator=(static_cast<const GeneralFadType&>(x));
143 template <
typename S>
147 GeneralFadType::operator=(x);
152 template <
typename S>
155 GeneralFadType::operator+=(x);
160 template <
typename S>
163 GeneralFadType::operator-=(x);
168 template <
typename S>
171 GeneralFadType::operator*=(x);
176 template <
typename S>
179 GeneralFadType::operator/=(x);
186 GeneralFadType::operator+=(static_cast<const GeneralFadType&>(x));
193 GeneralFadType::operator-=(static_cast<const GeneralFadType&>(x));
200 GeneralFadType::operator*=(static_cast<const GeneralFadType&>(x));
207 GeneralFadType::operator/=(static_cast<const GeneralFadType&>(x));
212 template <
typename S>
215 GeneralFadType::operator+=(x);
220 template <
typename S>
223 GeneralFadType::operator-=(x);
228 template <
typename S>
231 GeneralFadType::operator*=(x);
236 template <
typename S>
239 GeneralFadType::operator/=(x);
245 template <
typename T>
246 struct BaseExpr< GeneralFad<
T,Fad::DynamicStorage<T> > > {
250 template <
typename T>
252 static const unsigned value =
253 ExprLevel< typename DFad<T>::value_type >::value + 1;
256 template <
typename T>
258 static const bool value =
true;
263 template <
typename T>
268 template <
typename T>
273 template <
typename T>
280 template <
typename,
unsigned,
unsigned,
typename>
class ViewFad;
284 template<
class ValueType,
unsigned length,
unsigned str
ide >
293 template<
class ValueType,
unsigned length,
unsigned str
ide >
Sacado::FAD_NS::ViewFad< const ValueType, length, stride, Sacado::FAD_NS::DFad< ValueType > > type
KOKKOS_INLINE_FUNCTION DFad(const int sz, const ValueT &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
#define SACADO_ENABLE_VALUE_CTOR_DECL
Base template specification for whether a type is a Fad type.
Forward-mode AD class using dynamic memory allocation and expression templates.
KOKKOS_INLINE_FUNCTION DFad(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
#define SACADO_ENABLE_EXPR_CTOR_DECL
ScalarType< ValueT >::type ScalarT
Typename of scalar's (which may be different from ValueT)
KOKKOS_INLINE_FUNCTION DFad()
Default constructor.
KOKKOS_INLINE_FUNCTION DFad(const DFad &x)
Copy constructor.
KOKKOS_INLINE_FUNCTION DFad(const int sz, const int i, const ValueT &x)
Constructor with size sz, index i, and value x.
#define KOKKOS_INLINE_FUNCTION
FAD_NS::DFad< T >::base_expr_type type
ExprType::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
#define SACADO_ENABLE_VALUE_FUNC(RETURN_TYPE)
DFad< typename GeneralFad< T, Fad::DynamicStorage< T > >::value_type > type
Get the base Fad type from a view/expression.
Forward-mode AD class using dynamic memory allocation and expression templates.
Fad::DynamicStorage< ValueT > StorageType
Base classes.
ExprType::value_type value_type
Typename of values.
#define SACADO_ENABLE_EXPR_FUNC(RETURN_TYPE)
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
Expr< GeneralFadType > ExprType
Initialize the derivative array.
KOKKOS_INLINE_FUNCTION ~DFad()
Destructor.
KOKKOS_INLINE_FUNCTION DFad(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x convertible to ValueT.
Sacado::FAD_NS::ViewFad< ValueType, length, stride, Sacado::FAD_NS::DFad< ValueType > > type
Turn DFad into a meta-function class usable with mpl::apply.
GeneralFad< ValueT, StorageType > GeneralFadType
Get view type for any Fad type.