-
Notifications
You must be signed in to change notification settings - Fork 137
parallel CreateHalfedges #1188
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
parallel CreateHalfedges #1188
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1188 +/- ##
=======================================
Coverage 91.62% 91.62%
=======================================
Files 32 32
Lines 6067 6069 +2
=======================================
+ Hits 5559 5561 +2
Misses 508 508 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Thanks!
src/impl.cpp
Outdated
|
||
#if MANIFOLD_PAR == 1 | ||
Vec<std::pair<int, int>> ranges; | ||
int increment = std::min( |
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.
const?
src/impl.cpp
Outdated
}; | ||
int end = 0; | ||
while (end < numEdge) { | ||
int start = end; |
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.
const?
src/impl.cpp
Outdated
} | ||
for_each(ExecutionPolicy::Par, ranges.begin(), ranges.end(), | ||
[&](const std::pair<int, int>& range) { | ||
auto [start, end] = range; |
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.
wow, this syntax is starting to look like TS! C++ is definitely improving.
This turns out to be quite simple to parallelize. Not a huge gain though.