-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Adds free function tests for serializer #3036
Conversation
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
@rok-cesnovar or @t4c1 do one of yinz have time to look this over? |
I can take a look. |
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.
Tests look good.
src/stan/io/serializer.hpp
Outdated
*/ | ||
template <typename StdVec, require_std_vector_t<StdVec>* = nullptr> | ||
inline void write_free_simplex(const StdVec& x) { | ||
for (auto&& ret_i : x) { |
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.
for (auto&& ret_i : x) { | |
for (const auto& ret_i : x) { |
Same for other loops.
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
@t4c1 made the above fix ready for another look! |
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.
Looks good.
Submission Checklist
./runTests.py src/test/unit
make cpplint
Summary
For the refactoring of
transform_inits()
in the compiler we actually need the free functions to be in the serializer. See the discussion here for more info.Intended Effect
Allow the serializer to perform the free'ing of constrained variables
How to Verify
Tests were added to do the same checks as the
deserializer
's free testsSide Effects
Documentation
Documentation for each of the free functions in
serializer
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Steve Bronder
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: