Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

underflow in generated code #31

Closed
ghorn opened this issue Oct 14, 2023 · 3 comments
Closed

underflow in generated code #31

ghorn opened this issue Oct 14, 2023 · 3 comments

Comments

@ghorn
Copy link
Contributor

ghorn commented Oct 14, 2023

I tried clarabel code generation and I got this error:

error: unsigned conversion from 'int' to 'long unsigned int' changes value from '-1' to '18446744073709551615' [-Werror=sign-conversion]
 5440 | cpg_csc acc_canon_A_map = {1802, 1802, 13, acc_canon_A_map_p, acc_canon_A_map_i, acc_canon_A_map_x, -1};

I'm compiling generated code myself, not using cvxpygen's built-in compilation, and have a lot of warning flags on. This one looked more suspicious than the others.

@ghorn
Copy link
Contributor Author

ghorn commented Nov 4, 2023

Is nz from struct cpg_csc ever used? Can it be removed?

@ghorn
Copy link
Contributor Author

ghorn commented Nov 8, 2023

PR to remove it is here #33

@maxschaller
Copy link
Collaborator

Thanks for pointing this out, closed by #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants