-
-
Notifications
You must be signed in to change notification settings - Fork 379
Add virtual function model_compile_info to the model_base.hpp #2932
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
Conversation
@rok-cesnovar - branch names should include issue number |
I keep forgetting on the branch names. I made the branches before the issues and then forgot to rename them. Anyhow this should be ready for review. I added the generation of the model_compile_info to stanc2 for 2 reasons:
The relevant issue is stan-dev/cmdstan#887 |
Is there a reason this can't be a regular function instead of a virtual one? It just seems like something that would fit into the basic CRTP structure of the generated model class. |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
If I dont put the virtual method in model_base I get the following error
@bob-carpenter would you mind reviewing this? I updated the top-level comment with more details. |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
Anyone up for reviewing this? |
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.
LGTM!
Submission Checklist
./runTests.py src/test/unit
make cpplint
Summary
Adds the virtual function model_compile_info to the model_base, which will be used to retrieve the info about the compiler version and flags used.
Related Cmdstan PR stan-dev/cmdstan#896 and issue stan-dev/cmdstan#887
Stanc3 now adds this function to the model:
This PR adds a virtual function
model_compile_info()
and the generation of the same function (sans flags) in order to still support compiling models withSTANC2=true
. As compiling with STANC2 is only for debugging purpose, I did not implement the stancflags functionality for stanc2 as well.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):
Rok Češnovar, Univ. of Ljubljana
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: