interim release to help with future binary compatibility #234
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.
This PR sets the ground-work for an RcppParallel 5.1.10 release, whose main goals are to remove the accidental direct dependency on TBB that packages get when using RcppParallel's utilities. Using
gaston
from CRAN as an example:What this means is that any attempts to RcppParallel which change tbb internals will break packages like gaston, since those symbols may no longer be available (e.g. because they've moved to different namespaces, or APIs have changed altogether).
This PR resolves the issue by hiding the implementation details for parallelFor and parallelReduce within RcppParallel. This was harder than I expected because we allowed classes of the form:
And so, we have no knowledge of the actual user-defined class or its type from within the RcppParallel worker. Hence, we need to take the template type passed to
tbbParallelReduce()
, use that to construct a whole bunch of type-erased methods within a non-template class, and then pass that blob down. Gross.I'm hoping that, sometime after R 4.5.0 is released, we'll be able to delete this "glue" and have a more sane interface, but we'll see.
In any event, after doing all of this and then reinstalling
gaston
from sources, I see:and so we have now successfully hidden the TBB internals from
gaston
.