30 #ifndef SACADO_FAD_DMFAD_HPP
31 #define SACADO_FAD_DMFAD_HPP
35 #ifdef SACADO_NEW_FAD_DESIGN_IS_DEFAULT
43 using DMFad = Exp::GeneralFad< Exp::MemPoolStorage<T> >;
67 template <
typename ValueT>
68 class DMFad :
public Expr< GeneralFad<ValueT,MemPoolStorage<ValueT> > > {
108 template <
typename S>
125 DMFad(
const int sz,
const int i,
const ValueT & x) :
133 template <
typename S>
143 template <
typename S>
145 GeneralFadType::operator=(v);
151 GeneralFadType::operator=(static_cast<const GeneralFadType&>(x));
156 template <
typename S>
159 GeneralFadType::operator=(x);
164 static void setDefaultPool(MemPool* pool) {
165 MemPoolStorage<ValueT>::defaultPool_ = pool;
169 template <
typename S>
172 GeneralFadType::operator+=(x);
177 template <
typename S>
180 GeneralFadType::operator-=(x);
185 template <
typename S>
188 GeneralFadType::operator*=(x);
193 template <
typename S>
196 GeneralFadType::operator/=(x);
202 GeneralFadType::operator+=(static_cast<const GeneralFadType&>(x));
208 GeneralFadType::operator-=(static_cast<const GeneralFadType&>(x));
214 GeneralFadType::operator*=(static_cast<const GeneralFadType&>(x));
220 GeneralFadType::operator/=(static_cast<const GeneralFadType&>(x));
225 template <
typename S>
228 GeneralFadType::operator+=(x);
233 template <
typename S>
236 GeneralFadType::operator-=(x);
241 template <
typename S>
244 GeneralFadType::operator*=(x);
249 template <
typename S>
252 GeneralFadType::operator/=(x);
258 template <
typename T>
263 template <
typename T>
269 template <
typename T>
276 template <
typename T>
281 template <
typename T>
287 template<
class ValueType,
unsigned length,
unsigned str
ide >
293 template<
class ValueType,
unsigned length,
unsigned str
ide >
300 #endif // SACADO_NEW_FAD_DESIGN_IS_DEFAULT
302 #endif // SACADO_FAD_DMFAD_HPP
Wrapper for a generic expression template.
ExprType::value_type value_type
Typename of values.
DMFad(const int sz, const int i, const ValueT &x)
Constructor with size sz, index i, and value x.
Turn DMFad into a meta-function class usable with mpl::apply.
Sacado::Fad::ViewFad< ValueType, length, stride, Sacado::Fad::DMFad< ValueType > > type
Expr< GeneralFadType > ExprType
#define SACADO_ENABLE_VALUE_CTOR_DECL
DMFad(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
GeneralFad< MemPoolStorage< T > > DMFad
#define SACADO_ENABLE_EXPR_CTOR_DECL
#define KOKKOS_INLINE_FUNCTION
Fad::DMFad< T >::base_expr_type type
MemPoolStorage< ValueT > StorageType
Base classes.
#define SACADO_ENABLE_VALUE_FUNC(RETURN_TYPE)
Determine whether a given type is an expression.
DMFad(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x convertible to ValueT.
Meta-function for determining concrete base expression.
Derivative array storage class using dynamic memory allocation.
Get the base Fad type from a view/expression.
ExprType::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
#define SACADO_ENABLE_EXPR_FUNC(RETURN_TYPE)
Meta-function for determining nesting with an expression.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
Sacado::Fad::ViewFad< const ValueType, length, stride, Sacado::Fad::DMFad< const ValueType > > type
DMFad(const DMFad &x)
Copy constructor.
static const unsigned value
Initialize the derivative array.
Forward-mode AD class using dynamic memory allocation and expression templates.
ScalarType< ValueT >::type ScalarT
Typename of scalar's (which may be different from ValueT)
DMFad(const int sz, const ValueT &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
GeneralFad< ValueT, StorageType > GeneralFadType
DMFad< typename GeneralFad< T, Fad::MemPoolStorage< T > >::value_type > type
DMFad()
Default constructor.
Forward-mode AD class templated on the storage for the derivative array.
Get view type for any Fad type.