Go to the source code of this file.
|
template<IterateDirection Dir, typename TNode , typename TMetric , typename TFunctor > |
void | iterateTree (KdTree< TNode, TMetric > &tree, IScheduler &scheduler, const TFunctor &functor, const Size nodeIdx, const Size depthLimit) |
| Calls a functor for every node of a K-d tree tree in specified direction. More...
|
|
template<IterateDirection Dir, typename TNode , typename TMetric , typename TFunctor > |
void | iterateTree (const KdTree< TNode, TMetric > &tree, IScheduler &scheduler, const TFunctor &functor, const Size nodeIdx, const Size depthLimit) |
|
◆ KdChild
◆ iterateTree() [1/2]
template<IterateDirection Dir, typename TNode , typename TMetric , typename TFunctor >
void iterateTree |
( |
const KdTree< TNode, TMetric > & |
tree, |
|
|
IScheduler & |
scheduler, |
|
|
const TFunctor & |
functor, |
|
|
const Size |
nodeIdx, |
|
|
const Size |
depthLimit |
|
) |
| |
◆ iterateTree() [2/2]
template<IterateDirection Dir, typename TNode , typename TMetric , typename TFunctor >
void iterateTree |
( |
KdTree< TNode, TMetric > & |
tree, |
|
|
IScheduler & |
scheduler, |
|
|
const TFunctor & |
functor, |
|
|
const Size |
nodeIdx = 0 , |
|
|
const Size |
depthLimit = Size(-1) |
|
) |
| |
Calls a functor for every node of a K-d tree tree in specified direction.
The functor is called with the node as a parameter. For top-down direction, functor may return false to skip all children nodes from processing, otherwise the iteration proceedes through the tree into leaf nodes.
- Parameters
-
tree | KdTree to iterate. |
scheduler | Scheduler used for sequential or parallelized task execution |
functor | Functor executed for every node |
nodeIdx | Index of the first processed node; use 0 for root node |
depthLimit | Maximal depth processed in parallel. |
Definition at line 465 of file KdTree.inl.h.
◆ nodeStack
Cached stack to avoid reallocation.
It is thread_local to allow using KdTree from multiple threads
Definition at line 5 of file KdTree.cpp.