mrc-3825: Use dust approach to method provision on initialisation #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 (heredust_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:
state()
method to move the logic from the R template into the C++, matching dustgpu_info
method which I should have added in Add dust-style capabilities testing #41 probably, but does very little