interim release to help with future binary compatibility#234
Merged
kevinushey merged 10 commits intomasterfrom Jan 28, 2025
Merged
interim release to help with future binary compatibility#234kevinushey merged 10 commits intomasterfrom
kevinushey merged 10 commits intomasterfrom
Conversation
Contributor
Author
|
RcppParallel 5.1.10 built from this branch is now on CRAN; I'm going to take care of merging this (and handling merge conflicts) soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
gastonfrom 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
gastonfrom sources, I see:and so we have now successfully hidden the TBB internals from
gaston.