Template Struct DgDx
Defined in File DgDx.hpp
Struct Documentation
-
template<typename ModelT>
struct DgDx Enzyme sparse constraint Jacobian, dg/dx, by one forward sweep per local variable.
- Template Parameters:
ModelT – - optimization component model
Public Static Functions
-
template<typename ScalarT, typename IdxT>
static inline void eval(const ModelT *model, const size_t n_var, const IdxT *row_indices, const IdxT *col_indices, const ScalarT *x, IdxT *rows, IdxT *cols, ScalarT *vals, IdxT &nnz) - Parameters:
model – [in] - Pointer to the model to be differentiated
n_var – [in] - Number of local variables
row_indices – [in] - Global row of each local constraint contribution
col_indices – [in] - Global column of each local variable
x – [in] - Local variables
rows – [out] - Row indices
cols – [out] - Column indices
vals – [out] - Values
nnz – [out] - Number of nonzeros