Skip to content

Commit

Permalink
fix argument list convention in red arg setters
Browse files Browse the repository at this point in the history
  • Loading branch information
giaf committed Jan 14, 2024
1 parent 6ee4b72 commit 2b18b0f
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 56 deletions.
7 changes: 4 additions & 3 deletions examples/c/example_d_ocp_qcqp_x0emb_part_cond.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions examples/c/example_d_ocp_qp_x0emb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions examples/c/example_d_ocp_qp_x0emb_cond.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions examples/c/example_d_ocp_qp_x0emb_part_cond.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions include/hpipm_d_ocp_qcqp_red.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//
Expand Down
8 changes: 4 additions & 4 deletions include/hpipm_d_ocp_qp_red.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//
Expand Down
8 changes: 4 additions & 4 deletions include/hpipm_s_ocp_qcqp_red.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//
Expand Down
8 changes: 4 additions & 4 deletions include/hpipm_s_ocp_qp_red.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//
Expand Down
16 changes: 8 additions & 8 deletions ocp_qp/x_ocp_qcqp_red.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,43 +117,43 @@ 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;

}



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;

}



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;

}



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;

Expand Down
16 changes: 8 additions & 8 deletions ocp_qp/x_ocp_qp_red.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,43 +112,43 @@ 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;

}



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;

}



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;

}



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;

Expand Down
7 changes: 4 additions & 3 deletions test_problems/test_d_cond_qcqp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions test_problems/test_d_ocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 4 additions & 3 deletions test_problems/test_d_ocp_qcqp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions test_problems/test_d_part_cond_qcqp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b18b0f

Please sign in to comment.