YOrch 1.0.0
Loading...
Searching...
No Matches
yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy > Struct Template Reference

Implementation backend for layout-driven erased plan payload storage. More...

#include <plan_exec_slots.hpp>

Inheritance diagram for yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >:

Public Types

using layout_type = detail::plan_slot_layout< Plan, LayoutPolicy >
 
using tuple_type = detail::plan_erased_slots_tuple_t< layout_type >
 
template<std::size_t I>
using output_type = typename Plan::template output_type< I >
 

Public Member Functions

 plan_exec_slots_impl ()=default
 
 plan_exec_slots_impl (const plan_exec_slots_impl &)=delete
 
plan_exec_slots_imploperator= (const plan_exec_slots_impl &)=delete
 
 plan_exec_slots_impl (plan_exec_slots_impl &&)=delete
 
plan_exec_slots_imploperator= (plan_exec_slots_impl &&)=delete
 
 ~plan_exec_slots_impl ()
 
template<std::size_t I>
requires std::is_void_v<output_type<I>>
constexpr bool has_value () const noexcept
 Void-output nodes never have a stored payload value.
 
template<std::size_t I>
requires (!std::is_void_v<output_type<I>>) && (slot_logical_policy<I> != detail::slot_logical_policy::must_payload)
constexpr bool has_value () const noexcept
 Reports whether maybe-payload node I currently stores a value.
 
template<std::size_t I, typename... Args>
requires detail::payload_node<Plan, I>
constexpr auto emplace (Args &&... args) noexcept(noexcept(slot_view_for< I >().emplace(std::forward< Args >(args)...))) -> output_type< I > &
 Constructs node I's payload in its assigned slot.
 
template<std::size_t I>
requires detail::payload_node<Plan, I> && (slot_logical_policy<I> == detail::slot_logical_policy::maybe_payload)
constexpr auto out () &noexcept -> direct_out< output_type< I > >
 Returns a direct-output sink for maybe-payload node I.
 
template<std::size_t I>
requires (!std::is_void_v<output_type<I>>)
constexpr auto get () &noexcept -> output_type< I > &
 Returns node I's stored payload.
 
template<std::size_t I>
requires (!std::is_void_v<output_type<I>>)
constexpr auto get () const &noexcept -> const output_type< I > &
 Returns node I's stored payload from a const slots object.
 
template<std::size_t I>
constexpr void destroy () noexcept
 Destroys node I's payload if the node has one.
 
template<std::size_t I>
constexpr auto prev_view_for () &
 Returns the from_prev view produced by node I's payload.
 
template<std::size_t I>
constexpr auto prev_view_for () const &
 Returns the const from_prev view produced by node I's payload.
 

Static Public Attributes

template<std::size_t I>
static constexpr detail::output_storage_mode output_storage_mode
 
template<std::size_t I>
static constexpr std::size_t slot_index = Plan::template slot_index<I>
 
template<std::size_t I>
static constexpr detail::slot_logical_policy slot_logical_policy
 Node-local logical slot policy inherited from the compiled plan.
 
static constexpr std::size_t physical_slot_count = layout_type::physical_slot_count
 Number of physical slots allocated by the selected layout.
 
template<std::size_t I>
static constexpr std::size_t physical_slot_index
 Physical slot index assigned to node I.
 
template<std::size_t K>
static constexpr detail::slot_physical_policy slot_physical_policy
 Storage-level policy assigned to physical slot K.
 

Detailed Description

template<typename Plan, typename LayoutPolicy>
requires detail::slot_layout_policy<LayoutPolicy>
struct yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >

Implementation backend for layout-driven erased plan payload storage.

This implementation is used by compact layouts such as slot_layout_serial_dfs_compact_policy. It stores physical slots as type-erased cells sized by the selected layout, then exposes a node-indexed API (emplace<I>, get<I>, destroy<I>, out<I>, prev_view_for<I>) to the executor.

The storage tuple is intentionally private so layout/backend details do not become part of the public API.

Definition at line 64 of file plan_exec_slots.hpp.

Member Typedef Documentation

◆ layout_type

◆ output_type

template<std::size_t I>
using yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::output_type = typename Plan::template output_type<I>

Definition at line 78 of file plan_exec_slots.hpp.

◆ tuple_type

Constructor & Destructor Documentation

◆ plan_exec_slots_impl() [1/3]

yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::plan_exec_slots_impl ( )
default

◆ plan_exec_slots_impl() [2/3]

◆ plan_exec_slots_impl() [3/3]

◆ ~plan_exec_slots_impl()

Member Function Documentation

◆ destroy()

template<std::size_t I>
constexpr void yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::destroy ( )
inlineconstexprnoexcept

Destroys node I's payload if the node has one.

Definition at line 185 of file plan_exec_slots.hpp.

◆ emplace()

template<std::size_t I, typename... Args>
requires detail::payload_node<Plan, I>
constexpr auto yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::emplace ( Args &&...  args) -> output_type<I>&
inlineconstexprnoexcept

Constructs node I's payload in its assigned slot.

Definition at line 137 of file plan_exec_slots.hpp.

◆ get() [1/2]

template<std::size_t I>
requires (!std::is_void_v<output_type<I>>)
constexpr auto yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::get ( ) & -> output_type<I>&
inlineconstexprnoexcept

Returns node I's stored payload.

Definition at line 159 of file plan_exec_slots.hpp.

◆ get() [2/2]

template<std::size_t I>
requires (!std::is_void_v<output_type<I>>)
constexpr auto yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::get ( ) const & -> const output_type<I>&
inlineconstexprnoexcept

Returns node I's stored payload from a const slots object.

Definition at line 173 of file plan_exec_slots.hpp.

◆ has_value() [1/2]

template<std::size_t I>
requires std::is_void_v<output_type<I>>
constexpr bool yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::has_value ( ) const
inlineconstexprnoexcept

Void-output nodes never have a stored payload value.

Definition at line 118 of file plan_exec_slots.hpp.

◆ has_value() [2/2]

template<std::size_t I>
requires (!std::is_void_v<output_type<I>>) && (slot_logical_policy<I> != detail::slot_logical_policy::must_payload)
constexpr bool yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::has_value ( ) const
inlineconstexprnoexcept

Reports whether maybe-payload node I currently stores a value.

Definition at line 128 of file plan_exec_slots.hpp.

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ out()

template<std::size_t I>
requires detail::payload_node<Plan, I> && (slot_logical_policy<I> == detail::slot_logical_policy::maybe_payload)
constexpr auto yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::out ( ) & -> direct_out<output_type<I>>
inlineconstexprnoexcept

Returns a direct-output sink for maybe-payload node I.

Definition at line 150 of file plan_exec_slots.hpp.

◆ prev_view_for() [1/2]

template<std::size_t I>
constexpr auto yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::prev_view_for ( ) &
inlineconstexpr

Returns the from_prev view produced by node I's payload.

Definition at line 197 of file plan_exec_slots.hpp.

◆ prev_view_for() [2/2]

template<std::size_t I>
constexpr auto yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::prev_view_for ( ) const &
inlineconstexpr

Returns the const from_prev view produced by node I's payload.

Definition at line 209 of file plan_exec_slots.hpp.

Member Data Documentation

◆ output_storage_mode

template<std::size_t I>
constexpr detail::output_storage_mode yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::output_storage_mode
staticconstexpr
Initial value:
=
constexpr bool is_adapter_descriptor_v
Definition adapters.hpp:63

Definition at line 81 of file plan_exec_slots.hpp.

◆ physical_slot_count

constexpr std::size_t yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::physical_slot_count = layout_type::physical_slot_count
staticconstexpr

Number of physical slots allocated by the selected layout.

Definition at line 97 of file plan_exec_slots.hpp.

◆ physical_slot_index

template<std::size_t I>
constexpr std::size_t yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::physical_slot_index
staticconstexpr
Initial value:
=
layout_type::template physical_slot_index<I>

Physical slot index assigned to node I.

Definition at line 103 of file plan_exec_slots.hpp.

◆ slot_index

template<std::size_t I>
constexpr std::size_t yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::slot_index = Plan::template slot_index<I>
staticconstexpr

Definition at line 85 of file plan_exec_slots.hpp.

◆ slot_logical_policy

template<std::size_t I>
constexpr detail::slot_logical_policy yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::slot_logical_policy
staticconstexpr
Initial value:
=

Node-local logical slot policy inherited from the compiled plan.

Definition at line 91 of file plan_exec_slots.hpp.

◆ slot_physical_policy

template<std::size_t K>
constexpr detail::slot_physical_policy yorch::detail::plan_exec_slots_impl< Plan, LayoutPolicy >::slot_physical_policy
staticconstexpr
Initial value:
=
layout_type::template physical_slot_policy<K>

Storage-level policy assigned to physical slot K.

Definition at line 110 of file plan_exec_slots.hpp.


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