Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::fast_multipole_embedder::FMEMultipoleKernel Class Reference

#include <ogdf/energybased/fast_multipole_embedder/FMEMultipoleKernel.h>

+ Inheritance diagram for ogdf::fast_multipole_embedder::FMEMultipoleKernel:

Public Member Functions

 FMEMultipoleKernel (FMEThread *pThread)
 
ArrayPartition arrayPartition (uint32_t n)
 creates an array partition with a default chunksize of 16 More...
 
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 More...
 
template<typename F >
void for_loop (const ArrayPartition &partition, F func)
 for loop on a partition More...
 
template<typename F >
void for_tree_partition (F functor)
 for loop on the tree partition More...
 
void multipoleApproxFinal (ArrayPartition &nodePointPartition)
 the final version, the wspd structure is only used for the top of the tree More...
 
void multipoleApproxNoWSPDStructure (ArrayPartition &nodePointPartition)
 new but slower method, parallel wspd computation without using the wspd structure More...
 
void multipoleApproxSingleThreaded (ArrayPartition &nodePointPartition)
 the single threaded version without fences More...
 
void multipoleApproxSingleWSPD (ArrayPartition &nodePointPartition)
 the original algorithm which runs the WSPD completely single threaded More...
 
void operator() (FMEGlobalContext *globalContext)
 main function of the kernel More...
 
void quadtreeConstruction (ArrayPartition &nodePointPartition)
 sub procedure for quadtree construction More...
 
template<typename T , typename C >
void sort_parallel (T *ptr, uint32_t n, C comparer)
 lazy parallel sorting for num_threads = power of two More...
 
template<typename T , typename C >
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 More...
 
template<typename T , typename C >
void sort_single (T *ptr, uint32_t n, C comparer)
 sorting single threaded More...
 
- Public Member Functions inherited from ogdf::fast_multipole_embedder::FMEKernel
 FMEKernel (FMEThread *pThread)
 
bool isMainThread () const
 returns true if this is the main thread ( the main thread is always the first thread ) More...
 
bool isSingleThreaded () const
 returns true if this run only uses one thread ) More...
 
uint32_t numThreads () const
 returns the total number of threads in the pool More...
 
void sync ()
 
uint32_t threadNr () const
 returns the index of the thread ( 0.. numThreads()-1 ) More...
 

Static Public Member Functions

static FMEGlobalContextallocateContext (ArrayGraph *pGraph, FMEGlobalOptions *pOptions, uint32_t numThreads)
 allocate the global and local contexts used by an instance of this kernel More...
 
static void deallocateContext (FMEGlobalContext *globalContext)
 free the global and local context More...
 

Private Attributes

FMEGlobalContextm_pGlobalContext = nullptr
 
FMELocalContextm_pLocalContext = nullptr
 

Detailed Description

Definition at line 53 of file FMEMultipoleKernel.h.

Constructor & Destructor Documentation

◆ FMEMultipoleKernel()

ogdf::fast_multipole_embedder::FMEMultipoleKernel::FMEMultipoleKernel ( FMEThread pThread)
inlineexplicit

Definition at line 56 of file FMEMultipoleKernel.h.

Member Function Documentation

◆ allocateContext()

static FMEGlobalContext* ogdf::fast_multipole_embedder::FMEMultipoleKernel::allocateContext ( ArrayGraph pGraph,
FMEGlobalOptions pOptions,
uint32_t  numThreads 
)
static

allocate the global and local contexts used by an instance of this kernel

◆ arrayPartition() [1/2]

ArrayPartition ogdf::fast_multipole_embedder::FMEMultipoleKernel::arrayPartition ( uint32_t  n)
inline

creates an array partition with a default chunksize of 16

Definition at line 83 of file FMEMultipoleKernel.h.

◆ arrayPartition() [2/2]

ArrayPartition ogdf::fast_multipole_embedder::FMEMultipoleKernel::arrayPartition ( uint32_t  n,
uint32_t  threadNr,
uint32_t  numThreads,
uint32_t  chunkSize 
)
inline

returns an array partition for the given threadNr and thread count

Definition at line 89 of file FMEMultipoleKernel.h.

◆ deallocateContext()

static void ogdf::fast_multipole_embedder::FMEMultipoleKernel::deallocateContext ( FMEGlobalContext globalContext)
static

free the global and local context

◆ for_loop()

template<typename F >
void ogdf::fast_multipole_embedder::FMEMultipoleKernel::for_loop ( const ArrayPartition partition,
func 
)
inline

for loop on a partition

Definition at line 129 of file FMEMultipoleKernel.h.

◆ for_tree_partition()

template<typename F >
void ogdf::fast_multipole_embedder::FMEMultipoleKernel::for_tree_partition ( functor)
inline

for loop on the tree partition

Definition at line 138 of file FMEMultipoleKernel.h.

◆ multipoleApproxFinal()

void ogdf::fast_multipole_embedder::FMEMultipoleKernel::multipoleApproxFinal ( ArrayPartition nodePointPartition)

the final version, the wspd structure is only used for the top of the tree

◆ multipoleApproxNoWSPDStructure()

void ogdf::fast_multipole_embedder::FMEMultipoleKernel::multipoleApproxNoWSPDStructure ( ArrayPartition nodePointPartition)

new but slower method, parallel wspd computation without using the wspd structure

◆ multipoleApproxSingleThreaded()

void ogdf::fast_multipole_embedder::FMEMultipoleKernel::multipoleApproxSingleThreaded ( ArrayPartition nodePointPartition)

the single threaded version without fences

◆ multipoleApproxSingleWSPD()

void ogdf::fast_multipole_embedder::FMEMultipoleKernel::multipoleApproxSingleWSPD ( ArrayPartition nodePointPartition)

the original algorithm which runs the WSPD completely single threaded

◆ operator()()

void ogdf::fast_multipole_embedder::FMEMultipoleKernel::operator() ( FMEGlobalContext globalContext)

main function of the kernel

◆ quadtreeConstruction()

void ogdf::fast_multipole_embedder::FMEMultipoleKernel::quadtreeConstruction ( ArrayPartition nodePointPartition)

sub procedure for quadtree construction

◆ sort_parallel() [1/2]

template<typename T , typename C >
void ogdf::fast_multipole_embedder::FMEMultipoleKernel::sort_parallel ( T *  ptr,
uint32_t  n,
comparer 
)
inline

lazy parallel sorting for num_threads = power of two

Definition at line 158 of file FMEMultipoleKernel.h.

◆ sort_parallel() [2/2]

template<typename T , typename C >
void ogdf::fast_multipole_embedder::FMEMultipoleKernel::sort_parallel ( T *  ptr,
uint32_t  n,
comparer,
uint32_t  threadNrBegin,
uint32_t  numThreads 
)
inline

lazy parallel sorting for num_threads = power of two

Definition at line 168 of file FMEMultipoleKernel.h.

◆ sort_single()

template<typename T , typename C >
void ogdf::fast_multipole_embedder::FMEMultipoleKernel::sort_single ( T *  ptr,
uint32_t  n,
comparer 
)
inline

sorting single threaded

Definition at line 148 of file FMEMultipoleKernel.h.

Member Data Documentation

◆ m_pGlobalContext

FMEGlobalContext* ogdf::fast_multipole_embedder::FMEMultipoleKernel::m_pGlobalContext = nullptr
private

Definition at line 192 of file FMEMultipoleKernel.h.

◆ m_pLocalContext

FMELocalContext* ogdf::fast_multipole_embedder::FMEMultipoleKernel::m_pLocalContext = nullptr
private

Definition at line 193 of file FMEMultipoleKernel.h.


The documentation for this class was generated from the following file: