![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Public Member Functions | |
| u32 | get_left_child (u32 id) const |
| Retrieves the left child node identifier for a given node ID. | |
| u32 | get_right_child (u32 id) const |
| Retrieves the right child node identifier for a given node ID. | |
| bool | is_id_leaf (u32 id) const |
| is the given id a leaf (Note that if there is no internal cell every node is a leaf) | |
| template<u32 tree_depth, class Functor1, class Functor2, class Functor3> | |
| void | stack_based_traversal (u32 root_node, Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const |
| stack based tree traversal | |
| template<u32 tree_depth, class Functor1, class Functor2, class Functor3> | |
| void | stack_based_traversal (Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const |
| stack based tree traversal | |
| template<class StackAccessor, class Functor1, class Functor2, class Functor3> | |
| void | stack_based_traversal (StackAccessor &&stack, u32 stack_size, u32 root_node, Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const |
| template<class StackAccessor, class Functor1, class Functor2, class Functor3> | |
| void | stack_based_traversal (StackAccessor &&stack, u32 stack_size, Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const |
| stack based tree traversal using a stack supplied by the caller (root = 0) | |
Public Attributes | |
| const u32 * | lchild_id |
| const u32 * | rchild_id |
| const u8 * | lchild_flag |
| const u8 * | rchild_flag |
| u32 | offset_leaf |
Definition at line 39 of file KarrasTreeTraverser.hpp.
Retrieves the left child node identifier for a given node ID.
| id | The identifier of the node for which to find the left child. |
Definition at line 52 of file KarrasTreeTraverser.hpp.
Retrieves the right child node identifier for a given node ID.
| id | The identifier of the node for which to find the right child. |
Definition at line 62 of file KarrasTreeTraverser.hpp.
|
inline |
is the given id a leaf (Note that if there is no internal cell every node is a leaf)
Definition at line 67 of file KarrasTreeTraverser.hpp.
|
inline |
stack based tree traversal
Definition at line 122 of file KarrasTreeTraverser.hpp.
|
inline |
stack based tree traversal using a stack supplied by the caller (root = 0)
Definition at line 194 of file KarrasTreeTraverser.hpp.
|
inline |
stack based tree traversal using a stack supplied by the caller instead of an internal std::array (e.g. a slice of a local_accessor for shared memory offload). stack is a functor (u32 id) -> u32 & giving access to the entry id of the stack. The stack must hold at least stack_size entries, which is enough for a traversal if stack_size >= tree depth + 1.
Definition at line 143 of file KarrasTreeTraverser.hpp.
|
inline |
stack based tree traversal
Definition at line 71 of file KarrasTreeTraverser.hpp.
| const u8* shamtree::KarrasTreeTraverserAccessed::lchild_flag |
Definition at line 42 of file KarrasTreeTraverser.hpp.
| const u32* shamtree::KarrasTreeTraverserAccessed::lchild_id |
Definition at line 40 of file KarrasTreeTraverser.hpp.
| u32 shamtree::KarrasTreeTraverserAccessed::offset_leaf |
Definition at line 44 of file KarrasTreeTraverser.hpp.
| const u8* shamtree::KarrasTreeTraverserAccessed::rchild_flag |
Definition at line 43 of file KarrasTreeTraverser.hpp.
| const u32* shamtree::KarrasTreeTraverserAccessed::rchild_id |
Definition at line 41 of file KarrasTreeTraverser.hpp.