38namespace fast_multipole_embedder {
44 template<
typename Func>
103 result.
end = o + s * chunkSize - 1;
120 if (partition.
begin > partition.
end) {
137 template<
typename T,
typename C>
140 std::sort(
ptr,
ptr + n, comparer);
145 template<
typename T,
typename C>
155 template<
typename T,
typename C>
162 std::sort(
ptr,
ptr + n, comparer);
175 if (this->
threadNr() == threadNrBegin) {
Definitions of various auxiliary classes for FME layout.
Declaration of FME kernel.
bool isMainThread() const
returns true if this is the main thread ( the main thread is always the first thread )
uint32_t threadNr() const
returns the index of the thread ( 0.. numThreads()-1 )
uint32_t numThreads() const
returns the total number of threads in the pool
ArrayPartition arrayPartition(uint32_t n, uint32_t threadNr, uint32_t numThreads, uint32_t chunkSize)
returns an array partition for the given threadNr and thread count
void multipoleApproxSingleThreaded(ArrayPartition &nodePointPartition)
the single threaded version without fences
FMELocalContext * m_pLocalContext
static FMEGlobalContext * allocateContext(ArrayGraph *pGraph, FMEGlobalOptions *pOptions, uint32_t numThreads)
allocate the global and local contexts used by an instance of this kernel
void sort_parallel(T *ptr, uint32_t n, C comparer)
lazy parallel sorting for num_threads = power of two
void sort_single(T *ptr, uint32_t n, C comparer)
sorting single threaded
void quadtreeConstruction(ArrayPartition &nodePointPartition)
sub procedure for quadtree construction
FMEGlobalContext * m_pGlobalContext
void multipoleApproxNoWSPDStructure(ArrayPartition &nodePointPartition)
new but slower method, parallel wspd computation without using the wspd structure
FMEMultipoleKernel(FMEThread *pThread)
ArrayPartition arrayPartition(uint32_t n)
creates an array partition with a default chunksize of 16
static void deallocateContext(FMEGlobalContext *globalContext)
free the global and local context
void sort_parallel(T *ptr, uint32_t n, C comparer, uint32_t threadNrBegin, uint32_t numThreads)
lazy parallel sorting for num_threads = power of two
void multipoleApproxFinal(ArrayPartition &nodePointPartition)
the final version, the wspd structure is only used for the top of the tree
void multipoleApproxSingleWSPD(ArrayPartition &nodePointPartition)
the original algorithm which runs the WSPD completely single threaded
void for_loop(const ArrayPartition &partition, F func)
for loop on a partition
void for_tree_partition(F functor)
for loop on the tree partition
void operator()(FMEGlobalContext *globalContext)
main function of the kernel
The fast multipole embedder work thread class.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
void for_loop(Func &func)
the main global options for a run
FMETreePartition treePartition
tree partition assigned to the thread
std::list< LinearQuadtree::NodeID > nodes