YOrch 1.0.0
Loading...
Searching...
No Matches
yorch::detail::child_layout< N > Struct Template Reference

Flat direct-child adjacency storage for a tree-shaped plan. More...

#include <layout.hpp>

Collaboration diagram for yorch::detail::child_layout< N >:

Public Attributes

std::array< std::size_t, N > counts {}
 
std::array< std::size_t, N > offsets {}
 
std::array< std::size_t,(N > 0 ? N - 1 :0)> indices {}
 

Detailed Description

template<std::size_t N>
struct yorch::detail::child_layout< N >

Flat direct-child adjacency storage for a tree-shaped plan.

For each node, this layout records:

  • counts[node]: how many direct children the node has
  • offsets[node]: where that node's child range begins in indices
  • indices: all child node indices concatenated into one flat buffer

This keeps child traversal compact and allocation-free while matching the current invariant that the compiled structure is a single-parent tree.

Template Parameters
NNumber of nodes in the compiled plan.

Definition at line 79 of file layout.hpp.

Member Data Documentation

◆ counts

template<std::size_t N>
std::array<std::size_t, N> yorch::detail::child_layout< N >::counts {}

Definition at line 80 of file layout.hpp.

◆ indices

template<std::size_t N>
std::array<std::size_t, (N > 0 ? N - 1 : 0)> yorch::detail::child_layout< N >::indices {}

Definition at line 82 of file layout.hpp.

◆ offsets

template<std::size_t N>
std::array<std::size_t, N> yorch::detail::child_layout< N >::offsets {}

Definition at line 81 of file layout.hpp.


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