1 #ifndef CPPAD_CG_GENERIC_MODEL_EXTERNAL_FUNCTION_WRAPPER_INCLUDED 2 #define CPPAD_CG_GENERIC_MODEL_EXTERNAL_FUNCTION_WRAPPER_INCLUDED 39 CPPADCG_ASSERT_KNOWN(!tx[0].sparse,
"independent array must be dense");
42 CPPADCG_ASSERT_KNOWN(!ty.
sparse,
"dependent array must be dense");
51 CPPADCG_ASSERT_KNOWN(tx[1].sparse,
"independent Taylor array must be sparse");
52 Base* tx1 =
static_cast<Base*
> (tx[1].
data);
55 tx[1].nnz, tx[1].idx, tx1,
68 CPPADCG_ASSERT_KNOWN(!tx[0].sparse,
"independent array must be dense");
71 CPPADCG_ASSERT_KNOWN(!px.
sparse,
"independent partials array must be dense");
75 CPPADCG_ASSERT_KNOWN(py[0].sparse,
"dependent partials array must be sparse");
76 Base* pyb =
static_cast<Base*
> (py[0].
data);
80 py[0].nnz, py[0].idx, pyb);
84 CPPADCG_ASSERT_KNOWN(tx[1].sparse,
"independent array must be sparse");
85 const Base* tx1 =
static_cast<const Base*
> (tx[1].
data);
86 CPPADCG_ASSERT_KNOWN(py[0].sparse,
"dependent partials array must be sparse");
87 CPPADCG_ASSERT_KNOWN(py[0].nnz == 0,
"first order dependent partials must be zero");
88 CPPADCG_ASSERT_KNOWN(!py[1].sparse,
"independent partials array must be dense");
92 tx[1].nnz, tx[1].idx, tx1,
VectorBase ForwardZero(const VectorBase &x)
VectorBase ReverseTwo(const VectorBase &tx, const VectorBase &ty, const VectorBase &py)
virtual bool forward(FunctorGenericModel< Base > &libModel, int q, int p, const Array tx[], Array &ty)
VectorBase ForwardOne(const VectorBase &tx)
VectorBase ReverseOne(const VectorBase &tx, const VectorBase &ty, const VectorBase &py)
virtual bool reverse(FunctorGenericModel< Base > &libModel, int p, const Array tx[], Array &px, const Array py[])