osqp
osqp copied to clipboard
AMD integer types
The direct linear solvers currently implemented both call amd_l_order
to find a prefactorisation permutation of the KKT matrix when the user specifies DLONG
. They use amd_order
otherwise. This works because both c_int
and SuiteSparse_long
are separately defined as long long
if DLONG
is chosen, and c_int
as int
otherwise.
This may break if a user somehow defines c_int
to be something else, e.g. some fixed width type. It would seemingly be more robust to just define SuiteSparse_long
to be c_int
(whatever it may be) and then use amd_l_order
in every case.