| 182 | } |
| 183 | |
| 184 | void 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 | |
| 202 | struct ContourInfo |
| 203 | { |
no test coverage detected