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
Definition MRTimer.h:60
base of union-find data structures: stores only the parent forest and the operations that depend on i...
Definition MRUnionFind.h:24
Definition MRBitSet.h:294
TypedBitSet & set(IndexType n, size_type len, bool val)
Definition MRBitSet.h:306
Vector<T> is indexed by size_t.
Definition MRVector.h:24
auto BitSetParallelForAll(const BS &bs, F &&f, Cb &&... cb)
Definition MRBitSetParallelFor.h:144
auto BitSetParallelForAllRanged(const BS &bs, F &&... f)
Definition MRBitSetParallelFor.h:122
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:36
bool isRoot(I a) const
returns true if given element is the root of some set
Definition MRUnionFind.h:81
const Vector< I, I > & parents() const
gets the parents of all elements as is
Definition MRUnionFind.h:104
TypedBitSet< I > findComponentBitSet(BaseUnionFind< I > &uf, I a, const TypedBitSet< I > *region=nullptr)
Definition MRUnionFindParallel.h:34
I find(I a)
finds the root of the set containing given element with optimizing data structure updates
Definition MRUnionFind.h:87
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:90
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8