42 namespace fast_multipole_embedder {
62 template<
typename FuncInvokerType>
70 void doWork()
override { funcInvoker(); }
87 inline uint32_t
threadNr()
const {
return m_threadNr; }
90 inline uint32_t
numThreads()
const {
return m_numThreads; }
101 #if defined(OGDF_SYSTEM_UNIX) && defined(OGDF_FME_THREAD_AFFINITY) 102 void unixSetAffinity();
151 template<
typename KernelType,
typename ArgType1>
154 for (uint32_t i=0; i < numThreads(); i++)
156 KernelType kernel(thread(i));
FMEThreadPool * m_pThreadPool
uint32_t threadNr() const
returns the index of the thread ( 0.. numThreads()-1 )
Definition of utility functions for FME layout.
Declaration of class ArrayGraph.
uint32_t numThreads() const
returns the total number of threads in the pool
void doWork() override
overrides the task doWork() method and invokes the function or functor
Representation of a barrier.
Class used to invoke a functor or function inside a thread.
FMEThreadPool * threadPool() const
returns the ThreadPool this thread belongs to
bool isMainThread() const
returns true if this is the main thread ( the main thread is always the first thread ) ...
FMEFuncInvokerTask(FuncInvokerType f)
constructor with an invoker
Implementation of a thread barrier.
FuncInvokerType funcInvoker
the invoker
Declaration of Thread class representing threads.
The fast multipole embedder work thread class.
Declaration of class LinearQuadtree.
Barrier * syncBarrier() const
returns the barrier instance used to sync the threads during execution
uint32_t numThreads() const
returns the number of threads in this pool
FMEThread * thread(uint32_t threadNr) const
returns the threadNr-th thread
void runKernel(ArgType1 arg1)
void setTask(FMETask *pTask)
sets the actual task
The namespace for all OGDF objects.
void operator()()
the main work function
The thread task class used only as an interface.