proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
workspace.hpp
Go to the documentation of this file.
1//
2// Copyright (c) 2022 INRIA
3//
8#ifndef PROXSUITE_SERIALIZATION_WORKSPACE_HPP
9#define PROXSUITE_SERIALIZATION_WORKSPACE_HPP
10
11#include <cereal/cereal.hpp>
13
14namespace cereal {
15
16template<class Archive, typename T>
17void
19{
20 archive(
21 // CEREAL_NVP(work.ldl),
22 // CEREAL_NVP(work.ldl_stack),
23 CEREAL_NVP(work.H_scaled),
24 CEREAL_NVP(work.g_scaled),
25 CEREAL_NVP(work.A_scaled),
26 CEREAL_NVP(work.b_scaled),
27 CEREAL_NVP(work.C_scaled),
28 CEREAL_NVP(work.l_scaled),
29 CEREAL_NVP(work.u_scaled),
30 CEREAL_NVP(work.x_prev),
31 CEREAL_NVP(work.y_prev),
32 CEREAL_NVP(work.z_prev),
33 CEREAL_NVP(work.kkt),
34 CEREAL_NVP(work.current_bijection_map),
35 CEREAL_NVP(work.new_bijection_map),
36 CEREAL_NVP(work.active_set_up),
37 CEREAL_NVP(work.active_set_low),
38 CEREAL_NVP(work.active_inequalities),
39 CEREAL_NVP(work.Hdx),
40 CEREAL_NVP(work.Cdx),
41 CEREAL_NVP(work.Adx),
42 CEREAL_NVP(work.active_part_z),
43 CEREAL_NVP(work.alphas),
44 CEREAL_NVP(work.dw_aug),
45 CEREAL_NVP(work.rhs),
46 CEREAL_NVP(work.err),
47
48 CEREAL_NVP(work.dual_feasibility_rhs_2),
49 CEREAL_NVP(work.correction_guess_rhs_g),
50 CEREAL_NVP(work.correction_guess_rhs_b),
51 CEREAL_NVP(work.alpha),
52
53 CEREAL_NVP(work.dual_residual_scaled),
54 CEREAL_NVP(work.primal_residual_in_scaled_up),
57 CEREAL_NVP(work.CTz),
58 CEREAL_NVP(work.constraints_changed),
59 CEREAL_NVP(work.dirty),
60 CEREAL_NVP(work.refactorize),
61 CEREAL_NVP(work.proximal_parameter_update),
62 CEREAL_NVP(work.is_initialized),
63 CEREAL_NVP(work.n_c));
64}
65
66template<typename T, class Archive>
67void
68save(Archive& ar, proxsuite::linalg::veg::Vec<T> const& vec_T)
69{
70 proxsuite::linalg::veg::isize len = vec_T.len();
71 ar(CEREAL_NVP(len));
72 for (proxsuite::linalg::veg::isize i = 0; i < len; i++)
73 ar(vec_T[i]);
74}
75
76template<typename T, class Archive>
77void
79{
81 ar(len);
82 vec_T.reserve(len);
83 for (proxsuite::linalg::veg::isize i = 0; i < len; i++)
84 ar(vec_T[i]);
85}
86
87} // namespace cereal
88
89#endif /* end of include guard PROXSUITE_SERIALIZATION_WORKSPACE_HPP */
void save(Archive &ar, Eigen::PlainObjectBase< Derived > const &m)
Definition eigen.hpp:21
void serialize(Archive &archive, proxsuite::proxqp::dense::Model< T > &model)
Definition model.hpp:18
void load(Archive &ar, Eigen::PlainObjectBase< Derived > &m)
Definition eigen.hpp:38
_detail::_meta::make_signed< usize >::Type isize
Definition typedefs.hpp:43
This class defines the workspace of the dense solver.
Definition workspace.hpp:26
proxsuite::linalg::veg::Vec< T > alphas
Definition workspace.hpp:70