MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / parallelPrepareLinkedLists

Function parallelPrepareLinkedLists

source/MRMesh/MRIntersectionContour.cpp:184–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void parallelPrepareLinkedLists( const std::vector<VarEdgeTri>& intersections, AccumulativeSet& accumulativeSet )
185{
186 MR_TIMER;
187 const auto sz = (int)intersections.size();
188 accumulativeSet.nList.resize( sz );
189 ParallelFor( 0, sz, [&] ( int i )
190 {
191 const VarEdgeTri& curr = intersections[i];
192 auto next = findNext( accumulativeSet, curr );
193 if ( !next )
194 return;
195 auto& currItem = accumulativeSet.nList[i];
196 auto& nextItem = accumulativeSet.nList[next->second];
197 currItem.next = next->second;
198 nextItem.prev = i;
199 } );
200}
201
202struct ContourInfo
203{

Callers 2

Calls 4

ParallelForFunction · 0.85
findNextFunction · 0.85
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected