30 #ifndef SACADO_FAD_DVFAD_HPP 31 #define SACADO_FAD_DVFAD_HPP 51 template <
typename ValueT>
53 public Expr< GeneralFad<ValueT,VectorDynamicStorage<ValueT> > > {
110 DVFad(
const int sz,
const int i,
const ValueT & x) :
118 DVFad(
const int sz, ValueT* x, ValueT*
dx,
bool zero_out =
false) :
127 DVFad(
const int sz,
const int i, ValueT* x, ValueT*
dx) :
135 template <
typename S>
145 template <
typename S>
147 GeneralFadType::operator=(v);
153 GeneralFadType::operator=(static_cast<const GeneralFadType&>(x));
158 template <
typename S>
161 GeneralFadType::operator=(x);
166 template <
typename S>
169 GeneralFadType::operator+=(x);
174 template <
typename S>
177 GeneralFadType::operator-=(x);
182 template <
typename S>
185 GeneralFadType::operator*=(x);
190 template <
typename S>
193 GeneralFadType::operator/=(x);
199 GeneralFadType::operator+=(static_cast<const GeneralFadType&>(x));
205 GeneralFadType::operator-=(static_cast<const GeneralFadType&>(x));
211 GeneralFadType::operator*=(static_cast<const GeneralFadType&>(x));
217 GeneralFadType::operator/=(static_cast<const GeneralFadType&>(x));
222 template <
typename S>
225 GeneralFadType::operator+=(x);
230 template <
typename S>
233 GeneralFadType::operator-=(x);
238 template <
typename S>
241 GeneralFadType::operator*=(x);
246 template <
typename S>
249 GeneralFadType::operator/=(x);
255 template <
typename T>
260 template <
typename T>
266 template <
typename T>
273 template <
typename T>
278 template <
typename T>
284 template<
class ValueType,
unsigned length,
unsigned str
ide >
290 template<
class ValueType,
unsigned length,
unsigned str
ide >
297 #endif // SACADO_FAD_DFAD_HPP Wrapper for a generic expression template.
DVFad< typename GeneralFad< T, Fad::VectorDynamicStorage< T > >::value_type > type
#define SACADO_ENABLE_VALUE_CTOR_DECL
ExprType::value_type value_type
Typename of values.
GeneralFad< ValueT, StorageType > GeneralFadType
Sacado::Fad::ViewFad< const ValueType, length, stride, Sacado::Fad::DVFad< const ValueType > > type
#define SACADO_ENABLE_EXPR_CTOR_DECL
DVFad(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
DVFad(const int sz, const int i, ValueT *x, ValueT *dx)
Constructor with supplied memory and index i.
ExprType::scalar_type scalar_type
Typename of scalar's (which may be different from T)
#define KOKKOS_INLINE_FUNCTION
#define SACADO_ENABLE_VALUE_FUNC(RETURN_TYPE)
Determine whether a given type is an expression.
Sacado::Fad::ViewFad< ValueType, length, stride, Sacado::Fad::DVFad< ValueType > > type
Meta-function for determining concrete base expression.
Fad::DVFad< T >::base_expr_type type
Get the base Fad type from a view/expression.
VectorDynamicStorage< ValueT > StorageType
Base classes.
#define SACADO_ENABLE_EXPR_FUNC(RETURN_TYPE)
Forward-mode AD class using dynamic memory allocation and expression templates.
Meta-function for determining nesting with an expression.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
DVFad()
Default constructor.
DVFad(const DVFad &x)
Copy constructor.
Turn DVFad into a meta-function class usable with mpl::apply.
DVFad(const int sz, const ValueT &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
ScalarType< ValueT >::type ScalarT
Typename of scalar's (which may be different from ValueT)
Derivative array storage class using dynamic memory allocation.
static const unsigned value
DVFad(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x convertible to ValueT.
DVFad(const int sz, ValueT *x, ValueT *dx, bool zero_out=false)
Constructor with supplied memory.
Initialize the derivative array.
Expr< GeneralFadType > ExprType
DVFad(const int sz, const int i, const ValueT &x)
Constructor with size sz, index i, and value x.
Forward-mode AD class templated on the storage for the derivative array.
Get view type for any Fad type.