Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
 
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
 
template<typename F >
void for_loop (const ArrayPartition &partition, F func)
 for loop on a partition
 
template<typename F >
void for_tree_partition (F functor)
 for loop on the tree partition
 
void multipoleApproxFinal (ArrayPartition &nodePointPartition)
 the final version, the wspd structure is only used for the top of the tree
 
void multipoleApproxNoWSPDStructure (ArrayPartition &nodePointPartition)
 new but slower method, parallel wspd computation without using the wspd structure
 
void multipoleApproxSingleThreaded (ArrayPartition &nodePointPartition)
 the single threaded version without fences
 
void multipoleApproxSingleWSPD (ArrayPartition &nodePointPartition)
 the original algorithm which runs the WSPD completely single threaded
 
void operator() (FMEGlobalContext *globalContext)
 main function of the kernel
 
void quadtreeConstruction (ArrayPartition &nodePointPartition)
 sub procedure for quadtree construction
 
template<typename T , typename C >
void sort_parallel (T *ptr, uint32_t n, C comparer)
 lazy parallel sorting for num_threads = power of two
 
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
 
template<typename T , typename C >
void sort_single (T *ptr, uint32_t n, C comparer)
 sorting single threaded
 
- 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 )
 
bool isSingleThreaded () const
 returns true if this run only uses one thread )
 
uint32_t numThreads () const
 returns the total number of threads in the pool
 
void sync ()
 
uint32_t threadNr () const
 returns the index of the thread ( 0.. numThreads()-1 )
 

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
 
static void deallocateContext (FMEGlobalContext *globalContext)
 free the global and local context
 

Private Attributes

FMEGlobalContextm_pGlobalContext = nullptr
 
FMELocalContextm_pLocalContext = nullptr
 

Detailed Description

Definition at line 52 of file FMEMultipoleKernel.h.

Constructor & Destructor Documentation

◆ FMEMultipoleKernel()

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

Definition at line 54 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 82 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 87 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,
F  func 
)
inline

for loop on a partition

Definition at line 119 of file FMEMultipoleKernel.h.

◆ for_tree_partition()

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

for loop on the tree partition

Definition at line 130 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 146 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 156 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 138 of file FMEMultipoleKernel.h.

Member Data Documentation

◆ m_pGlobalContext

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

Definition at line 182 of file FMEMultipoleKernel.h.

◆ m_pLocalContext

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

Definition at line 183 of file FMEMultipoleKernel.h.


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