TDS_3: Add an edge iterator that puts marks in Cell_data #4346
Draft
TDS_3: Add an edge iterator that puts marks in Cell_data #4346
Conversation
Member
|
@afabri If you have an id per cell, then the iterator can store a bitset encoding the visited status. This solves the multi-thread issues and removes the need of resetting since the bitset is simply dropped. |
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.
Summary of Changes
The edge iterator uses a cell iterator and for each edge of the cell gravitates around the edge. In case it finds a cell with a smaller address it it not the "representative" of the edge.
This PR proposes as alternative an edge iterator that stores in
TDS_3::Cell_dataif an edge was already seen before. If not seen one gravitates around to find the cell with smallest address, and marks the edge in all incident cells.This is faster (In vtune I saw that on one data set
make_mesh_3()passed 7% in theoperator++()of the edge iterator while protecting edges) and the bits ofCell_datawere not used so far.However, after a loop over edges one must loop over all cells to reset the mark. Also one cannot loop over all edges in two threads.
I added new names for the iterators which are up to discussion, but before that it would be good to see if there is a degradation of performance of large 3D triangulations, as setting the old marks are now bit setting operations and not just an assignment of 0, 1, or 2.
Release Management
TDS_3