-
Notifications
You must be signed in to change notification settings - Fork 5
[Core] Add an algorithm interface + StableTasks #269
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
Merged
Merged
Conversation
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
StableTasks.jl allows type stable tasks (previously type unstable), so it's significantly easier to multithread. This commit also shows how you could implement another "execution engine" a la what JuliaFolds2 does (maybe work stealing, etc) if you wanted. In benchmarking, StableTasks does decrease the number of allocations which can only be a good thing.
75e3526
to
1c0a0e4
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
rafaqz
reviewed
Mar 8, 2025
rafaqz
approved these changes
Mar 8, 2025
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.
Looks great.
@tiemvanderdeure maybe you want to take a look at the manifold stuff too?
This was referenced Mar 18, 2025
This was referenced Apr 16, 2025
Merged
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 was factored out of the "dev branch" #259 and contains the subset of changes that apply to GeometryOpsCore, for easier review.
Child PRs: #271 (TGGeometry) -> #275 (AdaptivePredicates) -> #273 (clipping algorithm type) -> #274 (trees)
Base.@assume_effects
on the low level functions, which caused issues on Julia v1.11 and was probably incorrect anywayAlgorithm{M <: Manifold}
, as discussed in Method v/s manifold #247. Also adds an abstract Operator supertype and some discussion in code comments, but no implementation or interface surface there yet.types.jl
into a directorytypes
with a bunch of files in it, for ease of readability / docs / use.TODOs (maybe not this PR):
format
method that takes in an incompletely specified algorithm and some geometry as input, and returns a completely specified algorithm. What does this mean? Imagine I callGO.intersection(FosterHormannClipping(), geom1, geom2)
. ThatFosterHormannClipping()
should get expanded toFosterHormannClipping(AutoAlgorithm(), AutoAccelerator())
. Then,format
will takeformat(alg, args...)
and:crstrait
of the two geometries, scan for incompatibilities, assign the correct manifold to the algorithm (maybe warn or emit debug info)best_manifold(::Algorithm)
.npoint
and later preparations to see what's most efficient, maybe not - depends on what we want!