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

Function findMaxVertId

source/MRMesh/MRMeshBuilder.cpp:16–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14{
15
16static VertId findMaxVertId( const Triangulation & t, const FaceBitSet * region )
17{
18 MR_TIMER;
19 return parallel_reduce( tbb::blocked_range( 0_f, t.endId() ), VertId{},
20 [&] ( const auto & range, VertId currMax )
21 {
22 for ( FaceId f = range.begin(); f < range.end(); ++f )
23 {
24 if ( region && !region->test( f ) )
25 continue;
26 currMax = std::max( { currMax, t[f][0], t[f][1], t[f][2] } );
27 }
28 return currMax;
29 },
30 [] ( VertId a, VertId b )
31 {
32 return a > b ? a : b;
33 } );
34}
35
36static VertId findMaxVertId( const std::vector<VertId> & verts )
37{

Callers 3

fromFaceSoupFunction · 0.85
addTrianglesFunction · 0.85
fromTrianglesParFunction · 0.85

Calls 6

maxFunction · 0.85
endIdMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
testMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected