Skip to content
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

mrc-3825: Use dust approach to method provision on initialisation #43

Merged
merged 7 commits into from Dec 1, 2022

Conversation

richfitz
Copy link
Member

Because dust supports both gpu and cpu models there's a bit of a faff with setting up pointers to the actual methods. Mode has never needed that but will once we share a template. There's a corresponding tweak in the .cpp itself to allow the template substitution to pick the target (here ode) and the container (here dust_ode)

With this, the dust.R.template and mode.R.template should be basically identical aside from swapping mode for dust. The mode.cpp file contains the same contents as the associated files in dust (it's split across a few files).

There's a couple of other small tweaks here:

  • a new param method (and corresponding empty bit in the template); this will become clearer once we merge with dust as there's a dance there to get nice parameter information (what does the model need in order to be created) from it
  • tweaks to the state() method to move the logic from the R template into the C++, matching dust
  • a new gpu_info method which I should have added in Add dust-style capabilities testing #41 probably, but does very little

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Base: 95.89% // Head: 96.80% // Increases project coverage by +0.91% 🎉

Coverage data is based on head (498e0df) compared to base (cfc1ba5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   95.89%   96.80%   +0.91%     
==========================================
  Files           3        3              
  Lines          73       94      +21     
==========================================
+ Hits           70       91      +21     
  Misses          3        3              
Impacted Files Coverage Δ
R/interface.R 97.14% <100.00%> (+1.22%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@richfitz richfitz marked this pull request as ready for review November 30, 2022 08:50
@richfitz richfitz merged commit 5b32b94 into main Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants