osqp icon indicating copy to clipboard operation
osqp copied to clipboard

AMD integer types

Open goulart-paul opened this issue 5 years ago • 0 comments

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.

goulart-paul avatar Aug 31 '19 15:08 goulart-paul