cyqlone develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
Loading...
Searching...
No Matches
cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder > Struct Template Reference

Detailed Description

template<index_t VL, StorageOrder DefaultOrder>
struct cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >

Definition at line 38 of file ocp-backend-cyqlone.tpp.

Line search

BreakpointsResult compute_partition_breakpoints (Context &ctx, std::vector< Breakpoint > &breakpoints, const ineq_constr_vec_t &Σ, const ineq_constr_vec_t &y, const ineq_constr_vec_t &Ad, const ineq_constr_vec_t &Ax, const ineq_constr_vec_t &b_min, const ineq_constr_vec_t &b_max)
template<class T, size_t N>
static void merge_chunk (std::span< const T > chunk, size_t chunk_index, std::span< const std::array< size_t, N > > separators, std::span< T > out)
BreakpointsResult guanaqo_tag_invoke (guanaqo::tag_t< get_breakpoints >, CyQPALMBackend &backend, Context &ctx, std::vector< Breakpoint > &breakpoints, const ineq_constr_vec_t &Σ, const ineq_constr_vec_t &y, const ineq_constr_vec_t &Ad, const ineq_constr_vec_t &Ax, const ineq_constr_vec_t &b_min, const ineq_constr_vec_t &b_max)

Linear algebra operations (level 1 BLAS-like)

template<class T, class U>
void xaxpy (Context &ctx, real_t a, const T &x, U &y)
 Compute y = a x + y.
template<class T, class U>
void xcopy (Context &ctx, const T &x, U &y) const
 Copy x to y.
template<class T, class U>
void set_constant (Context &ctx, T &x, const U &y) const
 Set each element of x to the constant value y.
template<class T>
void scale (Context &ctx, real_t s, T &x) const
 Multiply a vector x by a scalar s.
real_t dot (Context &ctx, const var_vec_t &a, const var_vec_t &b) const
 Dot product of a and b.
template<class... Args>
void local_dots (std::span< real_t, 1+sizeof...(Args)/2 > out, const auto &a, const auto &b, const Args &...others) const
 Compute multiple partial dot products, without reducing across threads.
template<class... Args>
std::array< real_t, sizeof...(Args)/2 > dots (Context &ctx, const Args &...args) const
 Compute multiple dot products at once.
template<class T>
auto norm_inf_l1_sq (Context &ctx, const T &x) const
 Compute the infinity, l1 and l2 norms of x.
template<class T>
real_t norm_inf (Context &ctx, const T &x) const
 Infinity or max norm of x.
template<class T>
real_t norm_squared (Context &ctx, const T &x) const
 Squared l2 norm of x.

Classes

struct  var_vec_t
struct  eq_constr_vec_t
struct  ineq_constr_vec_t
struct  active_set_t
struct  Timings
struct  PenaltySettings

Public Types

using OCP_t = cyqlone::CyqloneSolver<VL, real_t, DefaultOrder>
using Context = typename OCP_t::Context
using storage_t = typename OCP_t::template matrix<>
using simd = typename OCP_t::simd
using Stats = CyQPALMBackendStats

Public Member Functions

 CyQPALMBackend (const CyqloneStorage<> &ocp, CyqloneData data, const CyQPALMBackendSettings &settings)
void update_data (const CyqloneStorage<> &ocp)
void set_b_eq (std::span< const real_t > b_eq)
void set_b_lb (std::span< const real_t > b_lb)
void set_b_ub (std::span< const real_t > b_ub)
void warm_start (const var_vec_t &x, const ineq_constr_vec_t &y, const eq_constr_vec_t &λ)
void reset ()
index_t num_var () const
index_t num_eq_constr () const
index_t num_ineq_constr () const
var_vec_t var_vec () const
eq_constr_vec_t eq_constr_vec () const
ineq_constr_vec_t ineq_constr_vec () const
active_set_t active_set () const
template<class... Js>
void initialize_active_set (Js &...js) const
template<class... Xs>
void initialize_var_vec (Xs &...xs) const
template<class... Ys>
void initialize_ineq_constr_vec (Ys &...ys) const
template<class... Λs>
void initialize_eq_constr_vec (Λs &...λs) const
void initial_variables (Context &ctx, var_vec_t &x) const
void initial_multipliers_eq (Context &ctx, eq_constr_vec_t &λ) const
void initial_multipliers_ineq (Context &ctx, ineq_constr_vec_t &y) const
void ineq_constr_resid (Context &ctx, const ineq_constr_vec_t &Ax, ineq_constr_vec_t &e) const
void project_multipliers_ineq (Context &ctx, ineq_constr_vec_t &y) const
real_t ineq_constr_viol (Context &ctx, const ineq_constr_vec_t &Ax) const
real_t ineq_constr_resid_al (Context &ctx, const ineq_constr_vec_t &y, const ineq_constr_vec_t &ŷ, const ineq_constr_vec_t &Σ, ineq_constr_vec_t &e)
void eq_constr_resid (Context &ctx, const var_vec_t &x, eq_constr_vec_t &Mxb)
void mat_vec_MT (Context &ctx, const eq_constr_vec_t &λ, var_vec_t &Mᵀλ)
real_t unscaled_eq_constr_viol (Context &ctx, const eq_constr_vec_t &Mxb) const
void mat_vec_AT (Context &ctx, const ineq_constr_vec_t &y, var_vec_t &Aᵀy)
void mat_vec_AT (const ineq_constr_vec_t &y, var_vec_t &Aᵀy)
void mat_vec_A (Context &ctx, const var_vec_t &x, ineq_constr_vec_t &Ax)
ineq_constr_vec_t mat_vec_A (Context &ctx, const var_vec_t &x)
void grad_f (Context &ctx, const var_vec_t &x, var_vec_t &grad_f)
void grad_f_regularized (Context &ctx, real_t S, const var_vec_t &x, const var_vec_t &x_reg, var_vec_t &grad_f)
void grad_f_remove_regularization (Context &ctx, real_t S, const var_vec_t &x, const var_vec_t &x_reg, var_vec_t &grad_f)
real_t f_grad_f (Context &ctx, const var_vec_t &x, var_vec_t &grad_f)
std::tuple< real_t, var_vec_tf_grad_f (Context &ctx, const var_vec_t &x)
index_t update_penalty_y (Context &ctx, ineq_constr_vec_t &Σ, const ineq_constr_vec_t &e, const ineq_constr_vec_t &e_old, const PenaltySettings &settings)
 Increase the penalty parameters Σ for which the violation e has not decreased sufficiently compared to e_old.
void update_regularization_changed (Context &ctx, real_t S_new, real_t S_old)
 Called when the primal regularization S has changed: causes the factorization to be reset.
real_t boost_regularization (Context &ctx, real_t S, real_t S_boost)
 Decrease the primal regularization S to S_boost, to boost convergence when close to the solution.
void update_penalty_changed (Context &ctx, const ineq_constr_vec_t &Σ, index_t num_Σ_changed)
 Called when the penalty parameters Σ have been updated: causes the factorization to be reset if any of the penalty parameters have changed.
const ineq_constr_vec_tAx_min () const
const ineq_constr_vec_tAx_max () const
index_t calc_ŷ_Aᵀŷ (Context &ctx, const ineq_constr_vec_t &Ax, const ineq_constr_vec_t &Σ, const ineq_constr_vec_t &y, ineq_constr_vec_t &ŷ, var_vec_t &Aᵀŷ, active_set_t &J)
real_t unscaled_aug_lagr_norm (Context &ctx, const var_vec_t &grad_f, const var_vec_t &Mᵀλ, const var_vec_t &Aᵀŷ) const
void scale_variables (std::span< const real_t > in, var_vec_t &out) const
void scale_ineq_constr (std::span< const real_t > in, ineq_constr_vec_t &out) const
void scale_eq_constr (std::span< const real_t > in, eq_constr_vec_t &out) const
void unscale_variables (const var_vec_t &in, std::span< real_t > out) const
void unscale_ineq_constr (const ineq_constr_vec_t &in, std::span< real_t > out) const
void unscale_ineq_constr (const active_set_t &in, std::span< real_t > out) const
void unscale_eq_constr (const eq_constr_vec_t &in, std::span< real_t > out) const
index_t active_set_change (Context &ctx, real_t, const ineq_constr_vec_t &Σ, const active_set_t &J, const active_set_t &J_old)
void recompute_inner (Context &ctx, real_t S, const var_vec_t &x_outer, const var_vec_t &x, const eq_constr_vec_t &λ, var_vec_t &grad, ineq_constr_vec_t &Ax, var_vec_t &Mᵀλ)
real_t recompute_outer (Context &ctx, const var_vec_t &x, const var_vec_t &Aᵀŷ, const eq_constr_vec_t &λ, var_vec_t &grad, ineq_constr_vec_t &Ax, var_vec_t &Mᵀλ)
void print_solve_rhs_norms (Context &ctx, const var_vec_t &d, const eq_constr_vec_t &Δλ, const var_vec_t &grad, const var_vec_t &Mᵀλ, const var_vec_t &Aᵀŷ) const
void print_solve_resid_norms (Context &ctx, const var_vec_t &x, const var_vec_t &d, const var_vec_t &grad, const var_vec_t &ξ, const var_vec_t &Mᵀλ, const var_vec_t &Aᵀŷ, const var_vec_t &MᵀΔλ, const ineq_constr_vec_t &Ad, const active_set_t &J)
void solve (Context &ctx, const var_vec_t &x, const var_vec_t &grad, const var_vec_t &Mᵀλ, const var_vec_t &Aᵀŷ, const eq_constr_vec_t &Mxb, real_t S, const ineq_constr_vec_t &Σ, const active_set_t &J, var_vec_t &d, var_vec_t &ξ, ineq_constr_vec_t &Ad, eq_constr_vec_t &Δλ, var_vec_t &MᵀΔλ)
auto get_timed (Timings::type Timings::*member) const
Stats clear_stats ()
std::map< std::string, typename Timings::typeclear_timings ()

Public Attributes

OCP_t ocp
std::unique_ptr< typename OCP_t::SharedContextparallel_ctx = ocp.create_parallel_context()
CyQPALMBackendSettings settings
ineq_constr_vec_t b_min_strided
ineq_constr_vec_t b_max_strided
eq_constr_vec_t b_eq_strided
var_vec_t grad_strided
ineq_constr_vec_t ΔΣ
std::optional< var_vec_tx0
std::optional< ineq_constr_vec_ty0
std::optional< eq_constr_vec_tλ0
std::vector< std::array< size_t, 4 > > thread_indices
std::vector< Breakpointbreakpoints_temp
bool reset_factorization = true
bool update_pending = false
index_t num_updates = 0
std::unique_ptr< Timingsocp_timings
var_vec_t temp_var
eq_constr_vec_t temp_eq
ineq_constr_vec_t temp_ineq
Stats stats = {}

Static Public Attributes

static constexpr auto norms = cyqlone::norms<real_t, simd>{}

Class Documentation

◆ cyqlone::qpalm::CyQPALMBackend::Timings

struct cyqlone::qpalm::CyQPALMBackend::Timings
Class Members
typedef DefaultTimings type DefaultTimings
typedef Timed< DefaultTimings > timed_t guanaqo::Timed<batmat::DefaultTimings>
Class Members
type breakpoints {}
type calc_y_hat {}
type calc_y_hat_AT {}
type update_active_set_change {}
type update_factorization {}
type factor {}
type solve {}
type solve_MT {}
type solve_A {}
type solve_grad {}
type solve_resid {}
type recompute_outer_grad {}
type recompute_outer_A {}
type recompute_outer_AT {}
type recompute_outer_MT {}
type recompute_outer_norm {}
type recompute_inner_grad {}
type recompute_inner_A {}
type recompute_inner_MT {}
type ineq_constr_resid {}
type ineq_constr_viol {}
type ineq_constr_resid_al {}
type update_penalty_y {}

◆ cyqlone::qpalm::CyQPALMBackend::PenaltySettings

struct cyqlone::qpalm::CyQPALMBackend::PenaltySettings
Class Members
real_t θ
real_t Δy
real_t Δy_always
real_t max_penalty_y

Member Typedef Documentation

◆ OCP_t

template<index_t VL, StorageOrder DefaultOrder>
using cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::OCP_t = cyqlone::CyqloneSolver<VL, real_t, DefaultOrder>

Definition at line 39 of file ocp-backend-cyqlone.tpp.

◆ Context

template<index_t VL, StorageOrder DefaultOrder>
using cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::Context = typename OCP_t::Context

Definition at line 40 of file ocp-backend-cyqlone.tpp.

◆ storage_t

template<index_t VL, StorageOrder DefaultOrder>
using cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::storage_t = typename OCP_t::template matrix<>

Definition at line 41 of file ocp-backend-cyqlone.tpp.

◆ simd

template<index_t VL, StorageOrder DefaultOrder>
using cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::simd = typename OCP_t::simd

Definition at line 42 of file ocp-backend-cyqlone.tpp.

◆ Stats

template<index_t VL, StorageOrder DefaultOrder>
using cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::Stats = CyQPALMBackendStats

Definition at line 561 of file ocp-backend-cyqlone.tpp.

Constructor & Destructor Documentation

◆ CyQPALMBackend()

template<index_t VL, StorageOrder DefaultOrder>
cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::CyQPALMBackend ( const CyqloneStorage<> & ocp,
CyqloneData data,
const CyQPALMBackendSettings & settings )
inline

Definition at line 97 of file ocp-backend-cyqlone.tpp.

Member Function Documentation

◆ update_data()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::update_data ( const CyqloneStorage<> & ocp)
inline

Definition at line 126 of file ocp-backend-cyqlone.tpp.

◆ set_b_eq()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::set_b_eq ( std::span< const real_t > b_eq)
inline

Definition at line 133 of file ocp-backend-cyqlone.tpp.

◆ set_b_lb()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::set_b_lb ( std::span< const real_t > b_lb)
inline

Definition at line 136 of file ocp-backend-cyqlone.tpp.

◆ set_b_ub()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::set_b_ub ( std::span< const real_t > b_ub)
inline

Definition at line 139 of file ocp-backend-cyqlone.tpp.

◆ warm_start()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::warm_start ( const var_vec_t & x,
const ineq_constr_vec_t & y,
const eq_constr_vec_t & λ )
inline

Definition at line 143 of file ocp-backend-cyqlone.tpp.

◆ reset()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::reset ( )
inline

Definition at line 195 of file ocp-backend-cyqlone.tpp.

◆ num_var()

template<index_t VL, StorageOrder DefaultOrder>
index_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::num_var ( ) const
inlinenodiscard

Definition at line 203 of file ocp-backend-cyqlone.tpp.

◆ num_eq_constr()

template<index_t VL, StorageOrder DefaultOrder>
index_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::num_eq_constr ( ) const
inlinenodiscard

Definition at line 204 of file ocp-backend-cyqlone.tpp.

◆ num_ineq_constr()

template<index_t VL, StorageOrder DefaultOrder>
index_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::num_ineq_constr ( ) const
inlinenodiscard

Definition at line 205 of file ocp-backend-cyqlone.tpp.

◆ var_vec()

template<index_t VL, StorageOrder DefaultOrder>
var_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::var_vec ( ) const
inlinenodiscard

Definition at line 207 of file ocp-backend-cyqlone.tpp.

◆ eq_constr_vec()

template<index_t VL, StorageOrder DefaultOrder>
eq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::eq_constr_vec ( ) const
inlinenodiscard

Definition at line 208 of file ocp-backend-cyqlone.tpp.

◆ ineq_constr_vec()

template<index_t VL, StorageOrder DefaultOrder>
ineq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::ineq_constr_vec ( ) const
inlinenodiscard

Definition at line 211 of file ocp-backend-cyqlone.tpp.

◆ active_set()

template<index_t VL, StorageOrder DefaultOrder>
active_set_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::active_set ( ) const
inlinenodiscard

Definition at line 214 of file ocp-backend-cyqlone.tpp.

◆ initialize_active_set()

template<index_t VL, StorageOrder DefaultOrder>
template<class... Js>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::initialize_active_set ( Js &... js) const
inline

Definition at line 219 of file ocp-backend-cyqlone.tpp.

◆ initialize_var_vec()

template<index_t VL, StorageOrder DefaultOrder>
template<class... Xs>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::initialize_var_vec ( Xs &... xs) const
inline

Definition at line 223 of file ocp-backend-cyqlone.tpp.

◆ initialize_ineq_constr_vec()

template<index_t VL, StorageOrder DefaultOrder>
template<class... Ys>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::initialize_ineq_constr_vec ( Ys &... ys) const
inline

Definition at line 227 of file ocp-backend-cyqlone.tpp.

◆ initialize_eq_constr_vec()

template<index_t VL, StorageOrder DefaultOrder>
template<class... Λs>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::initialize_eq_constr_vec ( Λs &... λs) const
inline

Definition at line 231 of file ocp-backend-cyqlone.tpp.

◆ initial_variables()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::initial_variables ( Context & ctx,
var_vec_t & x ) const
inline

Definition at line 235 of file ocp-backend-cyqlone.tpp.

◆ initial_multipliers_eq()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::initial_multipliers_eq ( Context & ctx,
eq_constr_vec_t & λ ) const
inline

Definition at line 238 of file ocp-backend-cyqlone.tpp.

◆ initial_multipliers_ineq()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::initial_multipliers_ineq ( Context & ctx,
ineq_constr_vec_t & y ) const
inline

Definition at line 241 of file ocp-backend-cyqlone.tpp.

◆ ineq_constr_resid()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::ineq_constr_resid ( Context & ctx,
const ineq_constr_vec_t & Ax,
ineq_constr_vec_t & e ) const

Definition at line 45 of file ineq-constr.tpp.

◆ project_multipliers_ineq()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::project_multipliers_ineq ( Context & ctx,
ineq_constr_vec_t & y ) const

Definition at line 56 of file ineq-constr.tpp.

◆ ineq_constr_viol()

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::ineq_constr_viol ( Context & ctx,
const ineq_constr_vec_t & Ax ) const

Definition at line 76 of file ineq-constr.tpp.

◆ ineq_constr_resid_al()

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::ineq_constr_resid_al ( Context & ctx,
const ineq_constr_vec_t & y,
const ineq_constr_vec_t & ŷ,
const ineq_constr_vec_t & Σ,
ineq_constr_vec_t & e )

Definition at line 93 of file ineq-constr.tpp.

◆ eq_constr_resid()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::eq_constr_resid ( Context & ctx,
const var_vec_t & x,
eq_constr_vec_t & Mxb )
inline

Definition at line 256 of file ocp-backend-cyqlone.tpp.

◆ mat_vec_MT()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::mat_vec_MT ( Context & ctx,
const eq_constr_vec_t & λ,
var_vec_t & Mᵀλ )
inline

Definition at line 260 of file ocp-backend-cyqlone.tpp.

◆ unscaled_eq_constr_viol()

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::unscaled_eq_constr_viol ( Context & ctx,
const eq_constr_vec_t & Mxb ) const
inline

Definition at line 264 of file ocp-backend-cyqlone.tpp.

◆ mat_vec_AT() [1/2]

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::mat_vec_AT ( Context & ctx,
const ineq_constr_vec_t & y,
var_vec_t & Aᵀy )
inline

Definition at line 268 of file ocp-backend-cyqlone.tpp.

◆ mat_vec_AT() [2/2]

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::mat_vec_AT ( const ineq_constr_vec_t & y,
var_vec_t & Aᵀy )
inline

Definition at line 272 of file ocp-backend-cyqlone.tpp.

◆ mat_vec_A() [1/2]

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::mat_vec_A ( Context & ctx,
const var_vec_t & x,
ineq_constr_vec_t & Ax )
inline

Definition at line 276 of file ocp-backend-cyqlone.tpp.

◆ mat_vec_A() [2/2]

template<index_t VL, StorageOrder DefaultOrder>
ineq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::mat_vec_A ( Context & ctx,
const var_vec_t & x )
inline

Definition at line 279 of file ocp-backend-cyqlone.tpp.

◆ grad_f()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::grad_f ( Context & ctx,
const var_vec_t & x,
var_vec_t & grad_f )
inline

Definition at line 285 of file ocp-backend-cyqlone.tpp.

◆ grad_f_regularized()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::grad_f_regularized ( Context & ctx,
real_t S,
const var_vec_t & x,
const var_vec_t & x_reg,
var_vec_t & grad_f )
inline

Definition at line 288 of file ocp-backend-cyqlone.tpp.

◆ grad_f_remove_regularization()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::grad_f_remove_regularization ( Context & ctx,
real_t S,
const var_vec_t & x,
const var_vec_t & x_reg,
var_vec_t & grad_f )
inline

Definition at line 296 of file ocp-backend-cyqlone.tpp.

◆ f_grad_f() [1/2]

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::f_grad_f ( Context & ctx,
const var_vec_t & x,
var_vec_t & grad_f )
inline

Definition at line 302 of file ocp-backend-cyqlone.tpp.

◆ f_grad_f() [2/2]

template<index_t VL, StorageOrder DefaultOrder>
std::tuple< real_t, var_vec_t > cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::f_grad_f ( Context & ctx,
const var_vec_t & x )
inline

Definition at line 306 of file ocp-backend-cyqlone.tpp.

◆ update_penalty_y()

template<index_t VL, StorageOrder DefaultOrder>
index_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::update_penalty_y ( Context & ctx,
ineq_constr_vec_t & Σ,
const ineq_constr_vec_t & e,
const ineq_constr_vec_t & e_old,
const PenaltySettings & settings )

Increase the penalty parameters Σ for which the violation e has not decreased sufficiently compared to e_old.

Definition at line 9 of file ineq-constr.tpp.

◆ update_regularization_changed()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::update_regularization_changed ( Context & ctx,
real_t S_new,
real_t S_old )
inline

Called when the primal regularization S has changed: causes the factorization to be reset.

Definition at line 324 of file ocp-backend-cyqlone.tpp.

◆ boost_regularization()

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::boost_regularization ( Context & ctx,
real_t S,
real_t S_boost )
inline

Decrease the primal regularization S to S_boost, to boost convergence when close to the solution.

Definition at line 331 of file ocp-backend-cyqlone.tpp.

◆ update_penalty_changed()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::update_penalty_changed ( Context & ctx,
const ineq_constr_vec_t & Σ,
index_t num_Σ_changed )
inline

Called when the penalty parameters Σ have been updated: causes the factorization to be reset if any of the penalty parameters have changed.

Definition at line 338 of file ocp-backend-cyqlone.tpp.

◆ merge_chunk()

template<index_t VL, StorageOrder DefaultOrder>
template<class T, size_t N>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::merge_chunk ( std::span< const T > chunk,
size_t chunk_index,
std::span< const std::array< size_t, N > > separators,
std::span< T > out )
static

Definition at line 16 of file linesearch.tpp.

◆ compute_partition_breakpoints()

template<index_t VL, StorageOrder DefaultOrder>
BreakpointsResult cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::compute_partition_breakpoints ( Context & ctx,
std::vector< Breakpoint > & breakpoints,
const ineq_constr_vec_t & Σ,
const ineq_constr_vec_t & y,
const ineq_constr_vec_t & Ad,
const ineq_constr_vec_t & Ax,
const ineq_constr_vec_t & b_min,
const ineq_constr_vec_t & b_max )

Definition at line 36 of file linesearch.tpp.

◆ xaxpy()

template<index_t VL, StorageOrder DefaultOrder>
template<class T, class U>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::xaxpy ( Context & ctx,
real_t a,
const T & x,
U & y )

Compute y = a x + y.

Definition at line 13 of file linalg.tpp.

◆ xcopy()

template<index_t VL, StorageOrder DefaultOrder>
template<class T, class U>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::xcopy ( Context & ctx,
const T & x,
U & y ) const

Copy x to y.

Definition at line 20 of file linalg.tpp.

◆ set_constant()

template<index_t VL, StorageOrder DefaultOrder>
template<class T, class U>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::set_constant ( Context & ctx,
T & x,
const U & y ) const

Set each element of x to the constant value y.

Definition at line 27 of file linalg.tpp.

◆ scale()

template<index_t VL, StorageOrder DefaultOrder>
template<class T>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::scale ( Context & ctx,
real_t s,
T & x ) const

Multiply a vector x by a scalar s.

Definition at line 34 of file linalg.tpp.

◆ dot()

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::dot ( Context & ctx,
const var_vec_t & a,
const var_vec_t & b ) const
nodiscard

Dot product of a and b.

Definition at line 40 of file linalg.tpp.

◆ local_dots()

template<index_t VL, StorageOrder DefaultOrder>
template<class... Args>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::local_dots ( std::span< real_t, 1+sizeof...(Args)/2 > out,
const auto & a,
const auto & b,
const Args &... others ) const

Compute multiple partial dot products, without reducing across threads.

Definition at line 50 of file linalg.tpp.

◆ dots()

template<index_t VL, StorageOrder DefaultOrder>
template<class... Args>
std::array< real_t, sizeof...(Args)/2 > cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::dots ( Context & ctx,
const Args &... args ) const
nodiscard

Compute multiple dot products at once.

This is more efficient than computing them separately because only a single reduction across threads is needed.

Definition at line 61 of file linalg.tpp.

◆ norm_inf_l1_sq()

template<index_t VL, StorageOrder DefaultOrder>
template<class T>
auto cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::norm_inf_l1_sq ( Context & ctx,
const T & x ) const
nodiscard

Compute the infinity, l1 and l2 norms of x.

Definition at line 76 of file linalg.tpp.

◆ norm_inf()

template<index_t VL, StorageOrder DefaultOrder>
template<class T>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::norm_inf ( Context & ctx,
const T & x ) const
nodiscard

Infinity or max norm of x.

Definition at line 88 of file linalg.tpp.

◆ norm_squared()

template<index_t VL, StorageOrder DefaultOrder>
template<class T>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::norm_squared ( Context & ctx,
const T & x ) const
nodiscard

Squared l2 norm of x.

Definition at line 95 of file linalg.tpp.

◆ Ax_min()

template<index_t VL, StorageOrder DefaultOrder>
const ineq_constr_vec_t & cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::Ax_min ( ) const
inline

Definition at line 406 of file ocp-backend-cyqlone.tpp.

◆ Ax_max()

template<index_t VL, StorageOrder DefaultOrder>
const ineq_constr_vec_t & cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::Ax_max ( ) const
inline

Definition at line 407 of file ocp-backend-cyqlone.tpp.

◆ calc_ŷ_Aᵀŷ()

template<index_t VL, StorageOrder DefaultOrder>
index_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::calc_ŷ_Aᵀŷ ( Context & ctx,
const ineq_constr_vec_t & Ax,
const ineq_constr_vec_t & Σ,
const ineq_constr_vec_t & y,
ineq_constr_vec_t & ŷ,
var_vec_t & Aᵀŷ,
active_set_t & J )

Definition at line 114 of file ineq-constr.tpp.

◆ unscaled_aug_lagr_norm()

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::unscaled_aug_lagr_norm ( Context & ctx,
const var_vec_t & grad_f,
const var_vec_t & Mᵀλ,
const var_vec_t & Aᵀŷ ) const
inline

Definition at line 413 of file ocp-backend-cyqlone.tpp.

◆ scale_variables()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::scale_variables ( std::span< const real_t > in,
var_vec_t & out ) const
inline

Definition at line 427 of file ocp-backend-cyqlone.tpp.

◆ scale_ineq_constr()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::scale_ineq_constr ( std::span< const real_t > in,
ineq_constr_vec_t & out ) const
inline

Definition at line 430 of file ocp-backend-cyqlone.tpp.

◆ scale_eq_constr()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::scale_eq_constr ( std::span< const real_t > in,
eq_constr_vec_t & out ) const
inline

Definition at line 433 of file ocp-backend-cyqlone.tpp.

◆ unscale_variables()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::unscale_variables ( const var_vec_t & in,
std::span< real_t > out ) const
inline

Definition at line 437 of file ocp-backend-cyqlone.tpp.

◆ unscale_ineq_constr() [1/2]

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::unscale_ineq_constr ( const ineq_constr_vec_t & in,
std::span< real_t > out ) const
inline

Definition at line 440 of file ocp-backend-cyqlone.tpp.

◆ unscale_ineq_constr() [2/2]

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::unscale_ineq_constr ( const active_set_t & in,
std::span< real_t > out ) const
inline

Definition at line 443 of file ocp-backend-cyqlone.tpp.

◆ unscale_eq_constr()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::unscale_eq_constr ( const eq_constr_vec_t & in,
std::span< real_t > out ) const
inline

Definition at line 446 of file ocp-backend-cyqlone.tpp.

◆ active_set_change()

template<index_t VL, StorageOrder DefaultOrder>
index_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::active_set_change ( Context & ctx,
real_t ,
const ineq_constr_vec_t & Σ,
const active_set_t & J,
const active_set_t & J_old )
inline

Definition at line 450 of file ocp-backend-cyqlone.tpp.

◆ recompute_inner()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::recompute_inner ( Context & ctx,
real_t S,
const var_vec_t & x_outer,
const var_vec_t & x,
const eq_constr_vec_t & λ,
var_vec_t & grad,
ineq_constr_vec_t & Ax,
var_vec_t & Mᵀλ )
inline

Definition at line 499 of file ocp-backend-cyqlone.tpp.

◆ recompute_outer()

template<index_t VL, StorageOrder DefaultOrder>
real_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::recompute_outer ( Context & ctx,
const var_vec_t & x,
const var_vec_t & Aᵀŷ,
const eq_constr_vec_t & λ,
var_vec_t & grad,
ineq_constr_vec_t & Ax,
var_vec_t & Mᵀλ )
inline

Definition at line 516 of file ocp-backend-cyqlone.tpp.

◆ print_solve_rhs_norms()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::print_solve_rhs_norms ( Context & ctx,
const var_vec_t & d,
const eq_constr_vec_t & Δλ,
const var_vec_t & grad,
const var_vec_t & Mᵀλ,
const var_vec_t & Aᵀŷ ) const

Definition at line 68 of file solve.tpp.

◆ print_solve_resid_norms()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::print_solve_resid_norms ( Context & ctx,
const var_vec_t & x,
const var_vec_t & d,
const var_vec_t & grad,
const var_vec_t & ξ,
const var_vec_t & Mᵀλ,
const var_vec_t & Aᵀŷ,
const var_vec_t & MᵀΔλ,
const ineq_constr_vec_t & Ad,
const active_set_t & J )

Definition at line 93 of file solve.tpp.

◆ solve()

template<index_t VL, StorageOrder DefaultOrder>
void cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::solve ( Context & ctx,
const var_vec_t & x,
const var_vec_t & grad,
const var_vec_t & Mᵀλ,
const var_vec_t & Aᵀŷ,
const eq_constr_vec_t & Mxb,
real_t S,
const ineq_constr_vec_t & Σ,
const active_set_t & J,
var_vec_t & d,
var_vec_t & ξ,
ineq_constr_vec_t & Ad,
eq_constr_vec_t & Δλ,
var_vec_t & MᵀΔλ )

Definition at line 16 of file solve.tpp.

◆ get_timed()

template<index_t VL, StorageOrder DefaultOrder>
auto cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::get_timed ( Timings::type Timings::* member) const
inline

Definition at line 556 of file ocp-backend-cyqlone.tpp.

◆ clear_stats()

template<index_t VL, StorageOrder DefaultOrder>
Stats cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::clear_stats ( )
inline

Definition at line 563 of file ocp-backend-cyqlone.tpp.

◆ clear_timings()

template<index_t VL, StorageOrder DefaultOrder>
std::map< std::string, typename Timings::type > cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::clear_timings ( )
inline

Definition at line 565 of file ocp-backend-cyqlone.tpp.

◆ guanaqo_tag_invoke

template<index_t VL, StorageOrder DefaultOrder>
BreakpointsResult guanaqo_tag_invoke ( guanaqo::tag_t< get_breakpoints > ,
CyQPALMBackend< VL, DefaultOrder > & backend,
Context & ctx,
std::vector< Breakpoint > & breakpoints,
const ineq_constr_vec_t & Σ,
const ineq_constr_vec_t & y,
const ineq_constr_vec_t & Ad,
const ineq_constr_vec_t & Ax,
const ineq_constr_vec_t & b_min,
const ineq_constr_vec_t & b_max )
friend

Definition at line 358 of file ocp-backend-cyqlone.tpp.

Member Data Documentation

◆ norms

template<index_t VL, StorageOrder DefaultOrder>
auto cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::norms = cyqlone::norms<real_t, simd>{}
staticconstexpr

Definition at line 43 of file ocp-backend-cyqlone.tpp.

◆ ocp

template<index_t VL, StorageOrder DefaultOrder>
OCP_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::ocp

Definition at line 79 of file ocp-backend-cyqlone.tpp.

◆ parallel_ctx

template<index_t VL, StorageOrder DefaultOrder>
std::unique_ptr<typename OCP_t::SharedContext> cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::parallel_ctx = ocp.create_parallel_context()

Definition at line 80 of file ocp-backend-cyqlone.tpp.

◆ settings

template<index_t VL, StorageOrder DefaultOrder>
CyQPALMBackendSettings cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::settings

Definition at line 81 of file ocp-backend-cyqlone.tpp.

◆ b_min_strided

template<index_t VL, StorageOrder DefaultOrder>
ineq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::b_min_strided

Definition at line 82 of file ocp-backend-cyqlone.tpp.

◆ b_max_strided

template<index_t VL, StorageOrder DefaultOrder>
ineq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::b_max_strided

Definition at line 82 of file ocp-backend-cyqlone.tpp.

◆ b_eq_strided

template<index_t VL, StorageOrder DefaultOrder>
eq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::b_eq_strided

Definition at line 83 of file ocp-backend-cyqlone.tpp.

◆ grad_strided

template<index_t VL, StorageOrder DefaultOrder>
var_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::grad_strided

Definition at line 84 of file ocp-backend-cyqlone.tpp.

◆ ΔΣ

template<index_t VL, StorageOrder DefaultOrder>
ineq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::ΔΣ

Definition at line 85 of file ocp-backend-cyqlone.tpp.

◆ x0

template<index_t VL, StorageOrder DefaultOrder>
std::optional<var_vec_t> cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::x0

Definition at line 86 of file ocp-backend-cyqlone.tpp.

◆ y0

template<index_t VL, StorageOrder DefaultOrder>
std::optional<ineq_constr_vec_t> cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::y0

Definition at line 87 of file ocp-backend-cyqlone.tpp.

◆ λ0

template<index_t VL, StorageOrder DefaultOrder>
std::optional<eq_constr_vec_t> cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::λ0

Definition at line 88 of file ocp-backend-cyqlone.tpp.

◆ thread_indices

template<index_t VL, StorageOrder DefaultOrder>
std::vector<std::array<size_t, 4> > cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::thread_indices

Definition at line 89 of file ocp-backend-cyqlone.tpp.

◆ breakpoints_temp

template<index_t VL, StorageOrder DefaultOrder>
std::vector<Breakpoint> cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::breakpoints_temp

Definition at line 90 of file ocp-backend-cyqlone.tpp.

◆ reset_factorization

template<index_t VL, StorageOrder DefaultOrder>
bool cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::reset_factorization = true

Definition at line 92 of file ocp-backend-cyqlone.tpp.

◆ update_pending

template<index_t VL, StorageOrder DefaultOrder>
bool cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::update_pending = false

Definition at line 93 of file ocp-backend-cyqlone.tpp.

◆ num_updates

template<index_t VL, StorageOrder DefaultOrder>
index_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::num_updates = 0

Definition at line 94 of file ocp-backend-cyqlone.tpp.

◆ ocp_timings

template<index_t VL, StorageOrder DefaultOrder>
std::unique_ptr<Timings> cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::ocp_timings

Definition at line 95 of file ocp-backend-cyqlone.tpp.

◆ temp_var

template<index_t VL, StorageOrder DefaultOrder>
var_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::temp_var

Definition at line 537 of file ocp-backend-cyqlone.tpp.

◆ temp_eq

template<index_t VL, StorageOrder DefaultOrder>
eq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::temp_eq

Definition at line 538 of file ocp-backend-cyqlone.tpp.

◆ temp_ineq

template<index_t VL, StorageOrder DefaultOrder>
ineq_constr_vec_t cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::temp_ineq

Definition at line 539 of file ocp-backend-cyqlone.tpp.

◆ stats

template<index_t VL, StorageOrder DefaultOrder>
Stats cyqlone::qpalm::CyQPALMBackend< VL, DefaultOrder >::stats = {}

Definition at line 562 of file ocp-backend-cyqlone.tpp.


The documentation for this struct was generated from the following files: