Austin Schuh | 9049e20 | 2022-02-20 17:34:16 -0800 | [diff] [blame] | 1 | Code generation |
| 2 | =============== |
| 3 | |
| 4 | OSQP can generate tailored C code that compiles into a fast and reliable solver |
| 5 | for the given family of QP problems in which the problem data, but not its |
| 6 | dimensions, change between problem instances. |
| 7 | |
| 8 | |
| 9 | The generated code is: |
| 10 | |
| 11 | .. glossary:: |
| 12 | |
| 13 | Malloc-free |
| 14 | It does not perform any dynamic memory allocation. |
| 15 | |
| 16 | Library-free |
| 17 | It is not linked to any external library. |
| 18 | |
| 19 | Division-free |
| 20 | There are no division required in the ADMM algorithm |
| 21 | |
| 22 | |
| 23 | We make a distinction between two cases depending on which of the data are to be |
| 24 | treated as parameters. |
| 25 | |
| 26 | .. glossary:: |
| 27 | |
| 28 | Vectors as parameters |
| 29 | Vectors :math:`q`, :math:`l` and :math:`u` can change between problem instances. |
| 30 | This corresponds to the compiler flag :code:`EMBEDDED=1`. |
| 31 | :math:`\rho` adaptation is not enabled. |
| 32 | The generated code is division-free and has a very small footprint. |
| 33 | |
| 34 | Matrices as parameters |
| 35 | Both vectors :math:`q`, :math:`l`, :math:`u` and values in matrices |
| 36 | :math:`P` and :math:`A` can change between problem instances. |
| 37 | This corresponds to the compiler flag :code:`EMBEDDED=2`. |
| 38 | :math:`\rho` adaptation is enabled but the frequency does not rely on any timing. |
| 39 | We assume that the sparsity patterns of :math:`P` and :math:`A` are fixed. |
| 40 | |
| 41 | |
| 42 | .. toctree:: |
| 43 | :maxdepth: 1 |
| 44 | :glob: |
| 45 | |
| 46 | * |