From 2b18b0f419046cb00806520e2cf4bd691d149277 Mon Sep 17 00:00:00 2001 From: giaf Date: Sun, 14 Jan 2024 11:10:03 +0100 Subject: [PATCH] fix argument list convention in red arg setters --- examples/c/example_d_ocp_qcqp_x0emb_part_cond.c | 7 ++++--- examples/c/example_d_ocp_qp_x0emb.c | 7 ++++--- examples/c/example_d_ocp_qp_x0emb_cond.c | 7 ++++--- examples/c/example_d_ocp_qp_x0emb_part_cond.c | 7 ++++--- include/hpipm_d_ocp_qcqp_red.h | 8 ++++---- include/hpipm_d_ocp_qp_red.h | 8 ++++---- include/hpipm_s_ocp_qcqp_red.h | 8 ++++---- include/hpipm_s_ocp_qp_red.h | 8 ++++---- ocp_qp/x_ocp_qcqp_red.c | 16 ++++++++-------- ocp_qp/x_ocp_qp_red.c | 16 ++++++++-------- test_problems/test_d_cond_qcqp.c | 7 ++++--- test_problems/test_d_ocp.c | 7 ++++--- test_problems/test_d_ocp_qcqp.c | 7 ++++--- test_problems/test_d_part_cond_qcqp.c | 7 ++++--- 14 files changed, 64 insertions(+), 56 deletions(-) diff --git a/examples/c/example_d_ocp_qcqp_x0emb_part_cond.c b/examples/c/example_d_ocp_qcqp_x0emb_part_cond.c index ade5cebb..e45f83e9 100644 --- a/examples/c/example_d_ocp_qcqp_x0emb_part_cond.c +++ b/examples/c/example_d_ocp_qcqp_x0emb_part_cond.c @@ -324,10 +324,11 @@ int main() struct d_ocp_qcqp_reduce_eq_dof_arg qp_red_arg; d_ocp_qcqp_reduce_eq_dof_arg_create(&qp_red_arg, qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qcqp_reduce_eq_dof_arg_set_default(&qp_red_arg); - d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&qp_red_arg, 1); + d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &qp_red_arg); /************************************************ * part cond arg diff --git a/examples/c/example_d_ocp_qp_x0emb.c b/examples/c/example_d_ocp_qp_x0emb.c index e8d30bdb..6fc444ae 100644 --- a/examples/c/example_d_ocp_qp_x0emb.c +++ b/examples/c/example_d_ocp_qp_x0emb.c @@ -213,10 +213,11 @@ int main() struct d_ocp_qp_reduce_eq_dof_arg qp_red_arg; d_ocp_qp_reduce_eq_dof_arg_create(&qp_red_arg, qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qp_reduce_eq_dof_arg_set_default(&qp_red_arg); - d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&qp_red_arg, 1); + d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &qp_red_arg); /************************************************ * ipm arg diff --git a/examples/c/example_d_ocp_qp_x0emb_cond.c b/examples/c/example_d_ocp_qp_x0emb_cond.c index 6931cb68..8cfb9b4a 100644 --- a/examples/c/example_d_ocp_qp_x0emb_cond.c +++ b/examples/c/example_d_ocp_qp_x0emb_cond.c @@ -261,10 +261,11 @@ int main() struct d_ocp_qp_reduce_eq_dof_arg qp_red_arg; d_ocp_qp_reduce_eq_dof_arg_create(&qp_red_arg, qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qp_reduce_eq_dof_arg_set_default(&qp_red_arg); - d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&qp_red_arg, 1); + d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &qp_red_arg); /************************************************ * cond arg diff --git a/examples/c/example_d_ocp_qp_x0emb_part_cond.c b/examples/c/example_d_ocp_qp_x0emb_part_cond.c index cf0dc308..f25e1838 100644 --- a/examples/c/example_d_ocp_qp_x0emb_part_cond.c +++ b/examples/c/example_d_ocp_qp_x0emb_part_cond.c @@ -268,10 +268,11 @@ int main() struct d_ocp_qp_reduce_eq_dof_arg qp_red_arg; d_ocp_qp_reduce_eq_dof_arg_create(&qp_red_arg, qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qp_reduce_eq_dof_arg_set_default(&qp_red_arg); - d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&qp_red_arg, 1); + d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &qp_red_arg); /************************************************ * part cond arg diff --git a/include/hpipm_d_ocp_qcqp_red.h b/include/hpipm_d_ocp_qcqp_red.h index 62c1147d..6b583556 100644 --- a/include/hpipm_d_ocp_qcqp_red.h +++ b/include/hpipm_d_ocp_qcqp_red.h @@ -86,13 +86,13 @@ void d_ocp_qcqp_reduce_eq_dof_arg_create(struct d_ocp_qcqp_reduce_eq_dof_arg *ar // void d_ocp_qcqp_reduce_eq_dof_arg_set_default(struct d_ocp_qcqp_reduce_eq_dof_arg *arg); // -void d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(struct d_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(int *value, struct d_ocp_qcqp_reduce_eq_dof_arg *arg); // -void d_ocp_qcqp_reduce_eq_dof_arg_set_comp_prim_sol(struct d_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qcqp_reduce_eq_dof_arg_set_comp_prim_sol(int *value, struct d_ocp_qcqp_reduce_eq_dof_arg *arg); // -void d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(struct d_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(int *value, struct d_ocp_qcqp_reduce_eq_dof_arg *arg); // -void d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(struct d_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(int *value, struct d_ocp_qcqp_reduce_eq_dof_arg *arg); // hpipm_size_t d_ocp_qcqp_reduce_eq_dof_ws_memsize(struct d_ocp_qcqp_dim *dim); // diff --git a/include/hpipm_d_ocp_qp_red.h b/include/hpipm_d_ocp_qp_red.h index f0482b04..e40689dc 100644 --- a/include/hpipm_d_ocp_qp_red.h +++ b/include/hpipm_d_ocp_qp_red.h @@ -86,13 +86,13 @@ void d_ocp_qp_reduce_eq_dof_arg_create(struct d_ocp_qp_reduce_eq_dof_arg *arg, v // void d_ocp_qp_reduce_eq_dof_arg_set_default(struct d_ocp_qp_reduce_eq_dof_arg *arg); // -void d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(struct d_ocp_qp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(int *value, struct d_ocp_qp_reduce_eq_dof_arg *arg); // -void d_ocp_qp_reduce_eq_dof_arg_set_comp_prim_sol(struct d_ocp_qp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qp_reduce_eq_dof_arg_set_comp_prim_sol(int *value, struct d_ocp_qp_reduce_eq_dof_arg *arg); // -void d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(struct d_ocp_qp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(int *value, struct d_ocp_qp_reduce_eq_dof_arg *arg); // -void d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(struct d_ocp_qp_reduce_eq_dof_arg *arg, int value); +void d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(int *value, struct d_ocp_qp_reduce_eq_dof_arg *arg); // hpipm_size_t d_ocp_qp_reduce_eq_dof_ws_memsize(struct d_ocp_qp_dim *dim); // diff --git a/include/hpipm_s_ocp_qcqp_red.h b/include/hpipm_s_ocp_qcqp_red.h index caf37046..6ff2d6a1 100644 --- a/include/hpipm_s_ocp_qcqp_red.h +++ b/include/hpipm_s_ocp_qcqp_red.h @@ -86,13 +86,13 @@ void s_ocp_qcqp_reduce_eq_dof_arg_create(struct s_ocp_qcqp_reduce_eq_dof_arg *ar // void s_ocp_qcqp_reduce_eq_dof_arg_set_default(struct s_ocp_qcqp_reduce_eq_dof_arg *arg); // -void s_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(struct s_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(int *value, struct s_ocp_qcqp_reduce_eq_dof_arg *arg); // -void s_ocp_qcqp_reduce_eq_dof_arg_set_comp_prim_sol(struct s_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qcqp_reduce_eq_dof_arg_set_comp_prim_sol(int *value, struct s_ocp_qcqp_reduce_eq_dof_arg *arg); // -void s_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(struct s_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(int *value, struct s_ocp_qcqp_reduce_eq_dof_arg *arg); // -void s_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(struct s_ocp_qcqp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(int *value, struct s_ocp_qcqp_reduce_eq_dof_arg *arg); // hpipm_size_t s_ocp_qcqp_reduce_eq_dof_ws_memsize(struct s_ocp_qcqp_dim *dim); // diff --git a/include/hpipm_s_ocp_qp_red.h b/include/hpipm_s_ocp_qp_red.h index 5a7b3b07..c3a8753e 100644 --- a/include/hpipm_s_ocp_qp_red.h +++ b/include/hpipm_s_ocp_qp_red.h @@ -86,13 +86,13 @@ void s_ocp_qp_reduce_eq_dof_arg_create(struct s_ocp_qp_reduce_eq_dof_arg *arg, v // void s_ocp_qp_reduce_eq_dof_arg_set_default(struct s_ocp_qp_reduce_eq_dof_arg *arg); // -void s_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(struct s_ocp_qp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(int *value, struct s_ocp_qp_reduce_eq_dof_arg *arg); // -void s_ocp_qp_reduce_eq_dof_arg_set_comp_prim_sol(struct s_ocp_qp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qp_reduce_eq_dof_arg_set_comp_prim_sol(int *value, struct s_ocp_qp_reduce_eq_dof_arg *arg); // -void s_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(struct s_ocp_qp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(int *value, struct s_ocp_qp_reduce_eq_dof_arg *arg); // -void s_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(struct s_ocp_qp_reduce_eq_dof_arg *arg, int value); +void s_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(int *value, struct s_ocp_qp_reduce_eq_dof_arg *arg); // hpipm_size_t s_ocp_qp_reduce_eq_dof_ws_memsize(struct s_ocp_qp_dim *dim); // diff --git a/ocp_qp/x_ocp_qcqp_red.c b/ocp_qp/x_ocp_qcqp_red.c index 0dfcf85f..cb861d4e 100644 --- a/ocp_qp/x_ocp_qcqp_red.c +++ b/ocp_qp/x_ocp_qcqp_red.c @@ -117,10 +117,10 @@ void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_DEFAULT(struct OCP_QCQP_REDUCE_EQ_DOF_ARG *a -void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_ALIAS_UNCHANGED(struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_ALIAS_UNCHANGED(int *value, struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg) { - arg->alias_unchanged = value; + arg->alias_unchanged = *value; return; @@ -128,10 +128,10 @@ void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_ALIAS_UNCHANGED(struct OCP_QCQP_REDUCE_EQ_DO -void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_PRIM_SOL(struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_PRIM_SOL(int *value, struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg) { - arg->comp_prim_sol = value; + arg->comp_prim_sol = *value; return; @@ -139,10 +139,10 @@ void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_PRIM_SOL(struct OCP_QCQP_REDUCE_EQ_DOF_ -void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_EQ(struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_EQ(int *value, struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg) { - arg->comp_dual_sol_eq = value; + arg->comp_dual_sol_eq = *value; return; @@ -150,10 +150,10 @@ void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_EQ(struct OCP_QCQP_REDUCE_EQ_D -void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_INEQ(struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QCQP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_INEQ(int *value, struct OCP_QCQP_REDUCE_EQ_DOF_ARG *arg) { - arg->comp_dual_sol_ineq = value; + arg->comp_dual_sol_ineq = *value; return; diff --git a/ocp_qp/x_ocp_qp_red.c b/ocp_qp/x_ocp_qp_red.c index 9cc6936e..3f7120d9 100644 --- a/ocp_qp/x_ocp_qp_red.c +++ b/ocp_qp/x_ocp_qp_red.c @@ -112,10 +112,10 @@ void OCP_QP_REDUCE_EQ_DOF_ARG_SET_DEFAULT(struct OCP_QP_REDUCE_EQ_DOF_ARG *arg) -void OCP_QP_REDUCE_EQ_DOF_ARG_SET_ALIAS_UNCHANGED(struct OCP_QP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QP_REDUCE_EQ_DOF_ARG_SET_ALIAS_UNCHANGED(int *value, struct OCP_QP_REDUCE_EQ_DOF_ARG *arg) { - arg->alias_unchanged = value; + arg->alias_unchanged = *value; return; @@ -123,10 +123,10 @@ void OCP_QP_REDUCE_EQ_DOF_ARG_SET_ALIAS_UNCHANGED(struct OCP_QP_REDUCE_EQ_DOF_AR -void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_PRIM_SOL(struct OCP_QP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_PRIM_SOL(int *value, struct OCP_QP_REDUCE_EQ_DOF_ARG *arg) { - arg->comp_prim_sol = value; + arg->comp_prim_sol = *value; return; @@ -134,10 +134,10 @@ void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_PRIM_SOL(struct OCP_QP_REDUCE_EQ_DOF_ARG -void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_EQ(struct OCP_QP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_EQ(int *value, struct OCP_QP_REDUCE_EQ_DOF_ARG *arg) { - arg->comp_dual_sol_eq = value; + arg->comp_dual_sol_eq = *value; return; @@ -145,10 +145,10 @@ void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_EQ(struct OCP_QP_REDUCE_EQ_DOF_A -void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_INEQ(struct OCP_QP_REDUCE_EQ_DOF_ARG *arg, int value) +void OCP_QP_REDUCE_EQ_DOF_ARG_SET_COMP_DUAL_SOL_INEQ(int *value, struct OCP_QP_REDUCE_EQ_DOF_ARG *arg) { - arg->comp_dual_sol_ineq = value; + arg->comp_dual_sol_ineq = *value; return; diff --git a/test_problems/test_d_cond_qcqp.c b/test_problems/test_d_cond_qcqp.c index f8260a50..a6530b49 100644 --- a/test_problems/test_d_cond_qcqp.c +++ b/test_problems/test_d_cond_qcqp.c @@ -840,10 +840,11 @@ int main() struct d_ocp_qcqp_reduce_eq_dof_arg ocp_qp_red_arg; d_ocp_qcqp_reduce_eq_dof_arg_create(&ocp_qp_red_arg, ocp_qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qcqp_reduce_eq_dof_arg_set_default(&ocp_qp_red_arg); - d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&ocp_qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&ocp_qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&ocp_qp_red_arg, 1); + d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &ocp_qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &ocp_qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &ocp_qp_red_arg); /************************************************ * cond arguments diff --git a/test_problems/test_d_ocp.c b/test_problems/test_d_ocp.c index 651d783c..c773b9a5 100644 --- a/test_problems/test_d_ocp.c +++ b/test_problems/test_d_ocp.c @@ -911,10 +911,11 @@ int main() struct d_ocp_qp_reduce_eq_dof_arg qp_red_arg; d_ocp_qp_reduce_eq_dof_arg_create(&qp_red_arg, qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qp_reduce_eq_dof_arg_set_default(&qp_red_arg); - d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&qp_red_arg, 1); - d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&qp_red_arg, 1); + d_ocp_qp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &qp_red_arg); + d_ocp_qp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &qp_red_arg); hpipm_size_t qp_red_work_size = d_ocp_qp_reduce_eq_dof_ws_memsize(&dim); diff --git a/test_problems/test_d_ocp_qcqp.c b/test_problems/test_d_ocp_qcqp.c index b5c6e9f3..ea618373 100644 --- a/test_problems/test_d_ocp_qcqp.c +++ b/test_problems/test_d_ocp_qcqp.c @@ -905,10 +905,11 @@ int main() struct d_ocp_qcqp_reduce_eq_dof_arg qp_red_arg; d_ocp_qcqp_reduce_eq_dof_arg_create(&qp_red_arg, qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qcqp_reduce_eq_dof_arg_set_default(&qp_red_arg); - d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&qp_red_arg, 1); + d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &qp_red_arg); /************************************************ * ipm arg diff --git a/test_problems/test_d_part_cond_qcqp.c b/test_problems/test_d_part_cond_qcqp.c index 07dbc268..3350bad2 100644 --- a/test_problems/test_d_part_cond_qcqp.c +++ b/test_problems/test_d_part_cond_qcqp.c @@ -848,10 +848,11 @@ int main() struct d_ocp_qcqp_reduce_eq_dof_arg ocp_qp_red_arg; d_ocp_qcqp_reduce_eq_dof_arg_create(&ocp_qp_red_arg, ocp_qp_red_arg_mem); + int tmp_i1 = 1; d_ocp_qcqp_reduce_eq_dof_arg_set_default(&ocp_qp_red_arg); - d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&ocp_qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&ocp_qp_red_arg, 1); - d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&ocp_qp_red_arg, 1); + d_ocp_qcqp_reduce_eq_dof_arg_set_alias_unchanged(&tmp_i1, &ocp_qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_eq(&tmp_i1, &ocp_qp_red_arg); + d_ocp_qcqp_reduce_eq_dof_arg_set_comp_dual_sol_ineq(&tmp_i1, &ocp_qp_red_arg); /************************************************ * cond arguments