25 Tbb(
const Size numThreads = 0,
const Size granularity = 1000);
43 const Size granularity,
uint32_t Size
Integral type used to index arrays (by default).
#define NAMESPACE_SPH_END
Wrapper of another pointer-like object with reference-like const correctness.
Interface for executing tasks (potentially) asynchronously.
Interface that allows unified implementation of sequential and parallelized versions of algorithms.
Const-propagating wrapper for object with point semantics.
Scheduler encapsulating Intel Thread Building Blocks (TBB).
virtual Optional< Size > getThreadIdx() const override
Returns the index of the calling thread.
void setGranularity(const Size newGranularity)
virtual void parallelFor(const Size from, const Size to, const Size granularity, const Function< void(Size n1, Size n2)> &functor) override
Processes the given range concurrently.
void setThreadCnt(const Size numThreads)
Tbb(const Size numThreads=0, const Size granularity=1000)
virtual Size getThreadCnt() const override
Returns the number of threads used by this scheduler.
virtual SharedPtr< ITask > submit(const Function< void()> &task) override
Submits a task to be potentially executed asynchronously.
static SharedPtr< Tbb > getGlobalInstance()
virtual Size getRecommendedGranularity() const override
Returns a value of granularity that is expected to perform well with the current thread count.