cvxgrp / cvxpygen

Code generation with CVXPY

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

underflow in generated code

ghorn opened this issue · comments

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.

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

PR to remove it is here #33

Thanks for pointing this out, closed by #33