23 if ( region && !region->test( i ) )
41 if ( region && !region->test( i ) )
55 tbb::task_group_context ctx;
58 if ( region.test( uf.parent( i ) ) != region.test( i ) )
59 ctx.cancel_group_execution();
61 return !ctx.is_group_execution_cancelled();
72 tbb::parallel_for( tbb::blocked_range<I>(
I( 0 ),
I( uf.
size() ) ),
73 [&] (
const tbb::blocked_range<I> & range )
75 for ( I i = range.begin(); i < range.end(); ++i )
76 uf.findUpdateRange( i, range.begin(), range.end() );
#define MR_TIMER
FUNCTION in GCC/Clang returns only short function name without class name and template parameters
Definition MRTimer.h:56
base of union-find data structures: stores only the parent forest and the operations that depend on i...
Definition MRUnionFind.h:22
Definition MRBitSet.h:277
TypedBitSet & set(IndexType n, size_type len, bool val)
Definition MRBitSet.h:289
std::vector<T>-like container that requires specific indexing type,
Definition MRVector.h:23
auto BitSetParallelForAll(const BS &bs, F &&f, Cb &&... cb)
Definition MRBitSetParallelFor.h:133
auto BitSetParallelForAllRanged(const BS &bs, F &&... f)
Definition MRBitSetParallelFor.h:111
auto ParallelFor(I begin, I end, F &&f, Cb &&... cb)
Definition MRParallelFor.h:30
bool isSubdivision(const BaseUnionFind< I > &uf, const TypedBitSet< I > ®ion)
Definition MRUnionFindParallel.h:52
TypedBitSet< I > findRootsBitSet(const BaseUnionFind< I > &uf, const TypedBitSet< I > *region=nullptr)
Definition MRUnionFindParallel.h:17
auto size() const
returns the number of elements in union-find
Definition MRUnionFind.h:34
bool isRoot(I a) const
returns true if given element is the root of some set
Definition MRUnionFind.h:67
const Vector< I, I > & parents() const
gets the parents of all elements as is
Definition MRUnionFind.h:90
TypedBitSet< I > findComponentBitSet(BaseUnionFind< I > &uf, I a, const TypedBitSet< I > *region=nullptr)
Definition MRUnionFindParallel.h:34
class MRMESH_CLASS I
Definition MRMeshFwd.h:141
I find(I a)
finds the root of the set containing given element with optimizing data structure updates
Definition MRUnionFind.h:73
const Vector< I, I > & updateRootsParallel(BaseUnionFind< I > &uf)
Definition MRUnionFindParallel.h:67
I findUpdateRange(I a, I begin, I end)
finds the root of the set containing given element with optimizing data structure in the range [begin...
Definition MRUnionFind.h:76
only for bindings generation
Definition MRCameraOrientationPlugin.h:8