1 /************************************************************************************************** 2 * * 3 * This file is part of HPIPM. * 4 * * 5 * HPIPM -- High-Performance Interior Point Method. * 6 * Copyright (C) 2017-2018 by Gianluca Frison. * 7 * Developed at IMTEK (University of Freiburg) under the supervision of Moritz Diehl. * 8 * All rights reserved. * 9 * * 10 * This program is free software: you can redistribute it and/or modify * 11 * it under the terms of the GNU General Public License as published by * 12 * the Free Software Foundation, either version 3 of the License, or * 13 * (at your option) any later version *. 14 * * 15 * This program is distributed in the hope that it will be useful, * 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 18 * GNU General Public License for more details. * 19 * * 20 * You should have received a copy of the GNU General Public License * 21 * along with this program. If not, see <https://www.gnu.org/licenses/>. * 22 * * 23 * The authors designate this particular file as subject to the "Classpath" exception * 24 * as provided by the authors in the LICENSE file that accompained this code. * 25 * * 26 * Author: Gianluca Frison, gianluca.frison (at) imtek.uni-freiburg.de * 27 * * 28 **************************************************************************************************/ 29 30 31 32 #include <blasfeo_target.h> 33 #include <blasfeo_common.h> 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 struct d_ocp_nlp_sol 40 { 41 struct blasfeo_dvec *ux; 42 struct blasfeo_dvec *pi; 43 struct blasfeo_dvec *lam; 44 struct blasfeo_dvec *t; 45 int memsize; // memory size in bytes 46 }; 47 48 49 50 // 51 int d_memsize_ocp_nlp_sol(int N, int *nx, int *nu, int *nb, int *ng, int *ns); 52 // 53 void d_create_ocp_nlp_sol(int N, int *nx, int *nu, int *nb, int *ng, int *ns, struct d_ocp_nlp_sol *qp_sol, void *memory); 54 // 55 void d_cvt_ocp_nlp_sol_to_colmaj(struct d_ocp_nlp *qp, struct d_ocp_nlp_sol *qp_sol, double **u, double **x, double **ls, double **us, double **pi, double **lam_lb, double **lam_ub, double **lam_lg, double **lam_ug, double **lam_ls, double **lam_us); 56 // 57 void d_cvt_ocp_nlp_sol_to_rowmaj(struct d_ocp_nlp *qp, struct d_ocp_nlp_sol *qp_sol, double **u, double **x, double **ls, double **us, double **pi, double **lam_lb, double **lam_ub, double **lam_lg, double **lam_ug, double **lam_ls, double **lam_us); 58 // 59 void d_cvt_ocp_nlp_sol_to_libstr(struct d_ocp_nlp *qp, struct d_ocp_nlp_sol *qp_sol, struct blasfeo_dvec *u, struct blasfeo_dvec *ls, struct blasfeo_dvec *us, struct blasfeo_dvec *x, struct blasfeo_dvec *pi, struct blasfeo_dvec *lam_lb, struct blasfeo_dvec *lam_ub, struct blasfeo_dvec *lam_lg, struct blasfeo_dvec *lam_ug, struct blasfeo_dvec *lam_ls, struct blasfeo_dvec *lam_us); 60 61 #ifdef __cplusplus 62 } /* extern "C" */ 63 #endif 64