Open victorfors opened 1 year ago
I think it makes most sense to create them at the same places as other work vectors used in these functions. Let me know if you think otherwise. I will make a PR with a suggested fix.
I have made an implementation of this but it seems to break the backwards compatibility (test below). I assume any commits that updates the size of the work vector would do so.
https://github.com/casadi/casadi/blob/main/test/python/serialize.py
There are some stack-allocated vectors in casadi_cvx.hpp that limit the maximum size the input matrix can have. If your matrix is larger you run into undefined behavior, stack smashing or segmentation fault errors.
T1 beta[100] in the casadi_cvx function limits the input matrix to I believe 102x102. T1 pp[1000] in casadi_cvx_tri limits the input matrix to 1000x1000.