Austin Schuh | 9049e20 | 2022-02-20 17:34:16 -0800 | [diff] [blame] | 1 | #ifndef SCALING_H |
| 2 | # define SCALING_H |
| 3 | |
| 4 | # ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | # endif // ifdef __cplusplus |
| 7 | |
| 8 | // Functions to scale problem data |
| 9 | # include "types.h" |
| 10 | # include "lin_alg.h" |
| 11 | # include "constants.h" |
| 12 | |
| 13 | // Enable data scaling if EMBEDDED is disabled or if EMBEDDED == 2 |
| 14 | # if EMBEDDED != 1 |
| 15 | |
| 16 | /** |
| 17 | * Scale problem matrices |
| 18 | * @param work Workspace |
| 19 | * @return exitflag |
| 20 | */ |
| 21 | c_int scale_data(OSQPWorkspace *work); |
| 22 | # endif // if EMBEDDED != 1 |
| 23 | |
| 24 | |
| 25 | /** |
| 26 | * Unscale problem matrices |
| 27 | * @param work Workspace |
| 28 | * @return exitflag |
| 29 | */ |
| 30 | c_int unscale_data(OSQPWorkspace *work); |
| 31 | |
| 32 | |
| 33 | /** |
| 34 | * Unscale solution |
| 35 | * @param work Workspace |
| 36 | * @return exitflag |
| 37 | */ |
| 38 | c_int unscale_solution(OSQPWorkspace *work); |
| 39 | |
| 40 | # ifdef __cplusplus |
| 41 | } |
| 42 | # endif // ifdef __cplusplus |
| 43 | |
| 44 | #endif // ifndef SCALING_H |