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

parallelize some csg operations #381

Merged
merged 2 commits into from
Mar 20, 2023
Merged

Conversation

pca006132
Copy link
Collaborator

Just some trivial parallelization, results in ~5% improvement for meshes with many unions. Just thought of this and this makes me unable to fall asleep...
BatchBoolean is not optimized yet, not sure if I should do parallelization as it will mess up with the mesh size and may end up being slower.

@pca006132
Copy link
Collaborator Author

Btw @elalish part of the compose function has to be executed sequentially and will cause segfault when parallelized (the for loop that I left), not sure if that is a bug.

@codecov
Copy link

codecov bot commented Mar 18, 2023

Codecov Report

Patch coverage: 94.18% and project coverage change: +0.48 🎉

Comparison is base (d713986) 85.48% compared to head (a77984a) 85.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
+ Coverage   85.48%   85.96%   +0.48%     
==========================================
  Files          36       36              
  Lines        4415     4468      +53     
==========================================
+ Hits         3774     3841      +67     
+ Misses        641      627      -14     
Impacted Files Coverage Δ
src/cross_section/src/cross_section.cpp 71.03% <86.20%> (+9.70%) ⬆️
src/manifold/src/csg_tree.cpp 92.33% <98.11%> (+0.25%) ⬆️
src/manifold/src/sort.cpp 90.37% <100.00%> (ø)
src/utilities/include/par.h 94.28% <100.00%> (+0.53%) ⬆️

... and 2 files with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@elalish elalish merged commit 112f9ba into elalish:master Mar 20, 2023
@pca006132 pca006132 deleted the optimization branch August 15, 2023 12:53
@elalish elalish mentioned this pull request Nov 3, 2023
cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
* parallelize some csg operations

* use lower_bound on sorted vector
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