osqp / osqp-matlab

Matlab interface for OSQP
https://osqp.org/
Apache License 2.0
42 stars 25 forks source link

Codegen: Move generated data into workspace.c #10

Closed imciner2 closed 5 years ago

imciner2 commented 5 years ago

Modify the code generation routines to place the data into a workspace.c file and create prototypes for the variables (using extern) in workspace.h.

This allows for workspace.h to be included in multiple object files that are then linked together. Previously, the linker would error due to multiple definitions of the data variables (one in each object).

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

gbanjac commented 5 years ago

It looks very good! Thanks a lot for doing this. I have just minor comments.

imciner2 commented 5 years ago

Yep, qldl.h is not needed in the generated workspace.h/.c source files. It has been removed from the generator now.