-
Notifications
You must be signed in to change notification settings - Fork 27
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
Sync with fe86ed4 #48
Conversation
8302679
to
cb9718a
Compare
@@ -108,12 +108,12 @@ std::vector<Index> split_edges( | |||
std::vector<std::array<Index, 2>> parent_edge( | |||
num_output_vertices, | |||
{invalid<Index>(), invalid<Index>()}); | |||
tbb::parallel_for(Index(0), num_edges, [&](Index eid) { | |||
for (Index eid = 0; eid < num_edges; eid++) { |
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.
I don't understand why this change is necessary?
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.
Thread sanitizer is complaining about race condition. But yes, I think it is a false alarm.
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.
It's actually not a false alarm. Looking more closely at the code you are iterating over each edges, writing the vertex->edge relationship in the parent_edge
array. When multiple edges are incident to the same vertex this parent will be overwritten multiple time, with different edge indices each time.
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.
Actually, I think you are right. For split_long_edges
, every edge split point has a unique parent edge, so there is no race condition. However, for remove_degenerate_facets
, an edge split points may belong to multiple collinear edges, which leads to the race condition. Let me fix that.
No description provided.