Helios++
Helios software for LiDAR simulations
SimpleKDTreeGeometricStrategy Class Reference

Class providing a strategy for geometry-level parallelization of Simple KDTree building. The geometry-level parallelization is the one to be applied on upper tree nodes, where multiple threads work on the building of the same node. More...

#include <SimpleKDTreeGeometricStrategy.h>

Inheritance diagram for SimpleKDTreeGeometricStrategy:
Collaboration diagram for SimpleKDTreeGeometricStrategy:

Public Member Functions

 SimpleKDTreeGeometricStrategy (SimpleKDTreeFactory &kdtf)
 SimpleKDTreeGeometricStrategy default constructor. More...
 
virtual SimpleKDTreeGeometricStrategyclone (SimpleKDTreeFactory *kdtf) const
 Create a clone of the SimpleKDTreeGeometricStrategy. More...
 

Protected Member Functions

virtual void GEOM_defineSplit (KDTreeNode *node, KDTreeNode *parent, vector< Primitive * > &primitives, int const depth, int const assignedThreads) const
 Geometry-level parallel version of the SimpleKDTreeFactory::defineSplit function. More...
 
virtual void GEOM_computeNodeBoundaries (KDTreeNode *node, KDTreeNode *parent, bool const left, vector< Primitive * > const &primitives, int assignedThreads)
 Geometry-level parallel version of the SimpleKDTreeFactory::computeNodeBoundaries function. More...
 
virtual void GEOM_populateSplits (vector< Primitive * > const &primitives, int const splitAxis, double const splitPos, vector< Primitive * > &leftPrimitives, vector< Primitive * > &rightPrimitives, int assignedThreads) const
 Geometry-level parallel version of the SimpleKDTreeFactory::populateSplits function. More...
 
virtual void GEOM_buildChildrenNodes (KDTreeNode *node, KDTreeNode *parent, vector< Primitive * > const &primitives, int const depth, int const index, vector< Primitive * > &leftPrimitives, vector< Primitive * > &rightPrimitives, std::shared_ptr< SharedTaskSequencer > masters)
 Geometry-level parallel version of the SimpleKDTreeFactory::buildChildrenNodes function. More...
 

Protected Attributes

SimpleKDTreeFactorykdtf
 The simple KDTree factory to which geometric strategy shall be applied.
 

Friends

class MultiThreadKDTreeFactory
 

Detailed Description

Class providing a strategy for geometry-level parallelization of Simple KDTree building. The geometry-level parallelization is the one to be applied on upper tree nodes, where multiple threads work on the building of the same node.

Author
Alberto M. Esmoris Pena
Version
1.0

Constructor & Destructor Documentation

◆ SimpleKDTreeGeometricStrategy()

SimpleKDTreeGeometricStrategy::SimpleKDTreeGeometricStrategy ( SimpleKDTreeFactory kdtf)
inline

Member Function Documentation

◆ clone()

SimpleKDTreeGeometricStrategy * SimpleKDTreeGeometricStrategy::clone ( SimpleKDTreeFactory kdtf) const
virtual

Create a clone of the SimpleKDTreeGeometricStrategy.

Parameters
kdtfThe KDTreeFactory to be referenced by the clone
Returns
Clone of the SimpleKDTreeGeometricStrategy

Reimplemented in SAHKDTreeGeometricStrategy, FastSAHKDTreeGeometricStrategy, and AxisSAHKDTreeGeometricStrategy.

◆ GEOM_buildChildrenNodes()

void SimpleKDTreeGeometricStrategy::GEOM_buildChildrenNodes ( KDTreeNode node,
KDTreeNode parent,
vector< Primitive * > const &  primitives,
int const  depth,
int const  index,
vector< Primitive * > &  leftPrimitives,
vector< Primitive * > &  rightPrimitives,
std::shared_ptr< SharedTaskSequencer masters 
)
protectedvirtual

Geometry-level parallel version of the SimpleKDTreeFactory::buildChildrenNodes function.

It is expected that this function is called at any depth before the last geometry-level depth. In consequence, the left node is delegated upon current thread while right node is delegated upon a new created thread for such purpose.

See also
SimpleKDTreeFactory::buildChildrenNodes
Returns
True if a new master thread has been created, false otherwise. This method will return when all pending work related to recursively building of children nodes and all its descendants has been completed

Reimplemented in SAHKDTreeGeometricStrategy.

◆ GEOM_computeNodeBoundaries()

void SimpleKDTreeGeometricStrategy::GEOM_computeNodeBoundaries ( KDTreeNode node,
KDTreeNode parent,
bool const  left,
vector< Primitive * > const &  primitives,
int  assignedThreads 
)
protectedvirtual

Geometry-level parallel version of the SimpleKDTreeFactory::computeNodeBoundaries function.

Parameters
assignedThreadsHow many threads can be used to parallelize computations
See also
SimpleKDTreeFactory::computeNodeBoundaries

◆ GEOM_defineSplit()

void SimpleKDTreeGeometricStrategy::GEOM_defineSplit ( KDTreeNode node,
KDTreeNode parent,
vector< Primitive * > &  primitives,
int const  depth,
int const  assignedThreads 
) const
protectedvirtual

Geometry-level parallel version of the SimpleKDTreeFactory::defineSplit function.

Parameters
assignedThreadsHow many threads can be used to parallelize computations
See also
SimpleKDTreeFactory::defineSplit

Reimplemented in SAHKDTreeGeometricStrategy, and AxisSAHKDTreeGeometricStrategy.

◆ GEOM_populateSplits()

void SimpleKDTreeGeometricStrategy::GEOM_populateSplits ( vector< Primitive * > const &  primitives,
int const  splitAxis,
double const  splitPos,
vector< Primitive * > &  leftPrimitives,
vector< Primitive * > &  rightPrimitives,
int  assignedThreads 
) const
protectedvirtual

Geometry-level parallel version of the SimpleKDTreeFactory::populateSplits function.

Parameters
assignedThreadsHow many threads can be used to parallelize computations
See also
SimpleKDTreeFactory::populateSplits

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