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

Function parallelFor

source/MRMesh/MRParallelFor.cpp:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4{
5
6void parallelFor( size_t begin, size_t end, FunctionRef<void ( size_t )> f )
7{
8 tbb::parallel_for( tbb::blocked_range( begin, end ), [&f] ( const tbb::blocked_range<size_t>& range )
9 {
10 for ( auto i = range.begin(); i != range.end(); ++i )
11 f( i );
12 } );
13}
14
15void parallelFor( size_t begin, size_t end, FunctionRef<void ( size_t )> f, tbb::task_group_context& tgc )
16{

Callers 1

ParallelForFunction · 0.85

Calls 4

tryLockMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected