-
Notifications
You must be signed in to change notification settings - Fork 25
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
Cleanup and modernize the wrapper #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the changes and the new OSQP class, it's much easier to read and cleaner than what we previously had.
The only confusing thing in my opinion is that the installation instructions in the readme file are not updated.
parse(p, target_dir, varargin{:}); | ||
|
||
% Set internal variables | ||
if strcmp(p.Results.parameters, 'vectors') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use Matlab enumeration instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire file needs to be rewritten to support the newer codegen paradigm anyway, so I didn't actually change anything in there. We should do this when we update that file though.
c_sources/arrays_matlab.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's worth the trouble, but I think having a function that checks if the input is not empty (the !in || numel==0 check) will make the code slightly more readable and easier to maintain. Please ignore this comment if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are only two places we ever really check for this, and they are both in this file, so I don't think a helper function makes as large a difference.
Are you referring to the ones linked to from the readme that are hosted online? We need to update those in the main OSQP repo to fix that once this is all merged. |
Both it and the instructions in the package directory. |
Yea, the packaging script needs a rework to do a package builder to make distribution easier. |
Various modernizations and cleanups to the OSQP mex function and wrapper class.