Template Struct D2LDx2

Struct Documentation

template<typename ModelT>
struct D2LDx2

Enzyme sparse Hessian of \(L = \sigma f + \lambda^T g\), by one forward sweep per local variable over the reverse gradient of \(L\).

Template Parameters:

ModelT – - optimization component model

Public Static Functions

template<typename ScalarT, typename IdxT, typename RealT>
static inline void eval(const ModelT *model, const size_t n_var, const IdxT *variable_indices, const ScalarT *x, const RealT sigma, const RealT *lambda, 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

  • variable_indices – [in] - Global index of each local variable

  • x – [in] - Local variables

  • sigma – [in] - Objective factor

  • lambda – [in] - Multipliers of the local constraint contributions

  • rows – [out] - Row indices

  • cols – [out] - Column indices

  • vals – [out] - Values

  • nnz – [out] - Number of nonzeros