1 /************************************************************************************************** 2 * * 3 * This file is part of HPIPM. * 4 * * 5 * HPIPM -- High-Performance Interior Point Method. * 6 * Copyright (C) 2019 by Gianluca Frison. * 7 * Developed at IMTEK (University of Freiburg) under the supervision of Moritz Diehl. * 8 * All rights reserved. * 9 * * 10 * The 2-Clause BSD License * 11 * * 12 * Redistribution and use in source and binary forms, with or without * 13 * modification, are permitted provided that the following conditions are met: * 14 * * 15 * 1. Redistributions of source code must retain the above copyright notice, this * 16 * list of conditions and the following disclaimer. * 17 * 2. Redistributions in binary form must reproduce the above copyright notice, * 18 * this list of conditions and the following disclaimer in the documentation * 19 * and/or other materials provided with the distribution. * 20 * * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * 24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * 28 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 31 * * 32 * Author: Gianluca Frison, gianluca.frison (at) imtek.uni-freiburg.de * 33 * * 34 **************************************************************************************************/ 35 36 #include <math.h> 37 38 #include <blasfeo_target.h> 39 #include <blasfeo_common.h> 40 #include <blasfeo_d_aux.h> 41 #include <blasfeo_d_blas.h> 42 43 #include <hpipm_tree.h> 44 #include <hpipm_d_tree_ocp_qp.h> 45 #include <hpipm_d_tree_ocp_qp_sol.h> 46 #include <hpipm_d_tree_ocp_qp_res.h> 47 #include <hpipm_d_tree_ocp_qp_ipm.h> 48 #include <hpipm_d_core_qp_ipm.h> 49 #include <hpipm_d_core_qp_ipm_aux.h> 50 51 52 53 #define AXPY blasfeo_daxpy 54 #define COMPUTE_LAM_T_QP d_compute_lam_t_qp 55 #define COMPUTE_GAMMA_GAMMA_QP d_compute_Gamma_gamma_qp 56 #define COMPUTE_GAMMA_QP d_compute_gamma_qp 57 #define CORE_QP_IPM_WORKSPACE d_core_qp_ipm_workspace 58 #define COLSC blasfeo_dcolsc 59 #define DIAAD_SP blasfeo_ddiaad_sp 60 #define DIARE blasfeo_ddiare 61 #define GEAD blasfeo_dgead 62 #define GECP blasfeo_dgecp 63 #define GELQF blasfeo_dgelqf 64 #define GELQF_PD blasfeo_dgelqf_pd 65 #define GELQF_PD_LA blasfeo_dgelqf_pd_la 66 #define GELQF_PD_LLA blasfeo_dgelqf_pd_lla 67 #define GEMM_R_DIAG blasfeo_dgemm_nd 68 #define GEMV_DIAG blasfeo_dgemv_d 69 #define GEMV_N blasfeo_dgemv_n 70 #define GEMV_NT blasfeo_dgemv_nt 71 #define GEMV_T blasfeo_dgemv_t 72 #define GESE blasfeo_dgese 73 #define POTRF_L blasfeo_dpotrf_l 74 #define POTRF_L_MN blasfeo_dpotrf_l_mn 75 #define REAL double 76 #define ROWAD_SP blasfeo_drowad_sp 77 #define ROWIN blasfeo_drowin 78 #define ROWEX blasfeo_drowex 79 #define STRMAT blasfeo_dmat 80 #define STRVEC blasfeo_dvec 81 #define SYMV_L blasfeo_dsymv_l 82 #define SYRK_LN blasfeo_dsyrk_ln 83 #define SYRK_LN_MN blasfeo_dsyrk_ln_mn 84 #define SYRK_POTRF_LN_MN blasfeo_dsyrk_dpotrf_ln_mn 85 #define TRCP_L blasfeo_dtrcp_l 86 #define TREE_OCP_QP d_tree_ocp_qp 87 #define TREE_OCP_QP_IPM_ARG d_tree_ocp_qp_ipm_arg 88 #define TREE_OCP_QP_IPM_WORKSPACE d_tree_ocp_qp_ipm_workspace 89 #define TREE_OCP_QP_RES d_tree_ocp_qp_res 90 #define TREE_OCP_QP_RES_WORKSPACE d_tree_ocp_qp_res_workspace 91 #define TREE_OCP_QP_SOL d_tree_ocp_qp_sol 92 #define TRMM_RLNN blasfeo_dtrmm_rlnn 93 #define TRMV_LNN blasfeo_dtrmv_lnn 94 #define TRMV_LTN blasfeo_dtrmv_ltn 95 #define TRSV_LNN blasfeo_dtrsv_lnn 96 #define TRSV_LNN_MN blasfeo_dtrsv_lnn_mn 97 #define TRSV_LTN blasfeo_dtrsv_ltn 98 #define TRSV_LTN_MN blasfeo_dtrsv_ltn_mn 99 #define VECAD_SP blasfeo_dvecad_sp 100 #define VECCP blasfeo_dveccp 101 #define VECEX_SP blasfeo_dvecex_sp 102 #define VECMULACC blasfeo_dvecmulacc 103 #define VECMULDOT blasfeo_dvecmuldot 104 #define VECSC blasfeo_dvecsc 105 106 #define INIT_VAR_TREE_OCP_QP d_init_var_tree_ocp_qp 107 #define COMPUTE_LIN_RES_TREE_OCP_QP d_compute_lin_res_tree_ocp_qp 108 #define COMPUTE_RES_TREE_OCP_QP d_compute_res_tree_ocp_qp 109 #define FACT_SOLVE_KKT_UNCONSTR_TREE_OCP_QP d_fact_solve_kkt_unconstr_tree_ocp_qp 110 #define FACT_SOLVE_KKT_STEP_TREE_OCP_QP d_fact_solve_kkt_step_tree_ocp_qp 111 #define FACT_LQ_SOLVE_KKT_STEP_TREE_OCP_QP d_fact_lq_solve_kkt_step_tree_ocp_qp 112 #define SOLVE_KKT_STEP_TREE_OCP_QP d_solve_kkt_step_tree_ocp_qp 113 114 #define DOUBLE_PRECISION 115 116 117 118 #include "x_tree_ocp_qp_kkt.c" 119