7#include "../../assert.hpp"
8#include "../../result.hpp"
25 using raw_t = std::remove_cvref_t<R>;
27 if constexpr (std::is_same_v<raw_t, step_result>) {
28 return std::forward<R>(
r);
30 return std::forward<R>(
r).step;
68template <std::
size_t I,
typename Slots,
typename Raw>
70 using raw_t = std::remove_cvref_t<Raw>;
72 if constexpr (std::is_void_v<raw_t> ||
73 std::is_same_v<raw_t, step_result>) {
74 static_cast<void>(slots);
75 static_cast<void>(
raw);
80 "Successful task_result<T> must carry a payload before slot storage");
92template <
typename Slots, std::
size_t I>
116template <std::
size_t I,
typename Slots>
120 "Direct-output tasks returning success must construct their payload");
#define YORCH_ASSERT(condition)
constexpr step_result extract_step_result(R &&r)
constexpr step_result finalize_direct_output_step(Slots &slots, step_result step)
constexpr bool store_node_output(Slots &slots, Raw &raw)
Materializes the payload portion of a node's raw task return into the node's compiled slot,...
constexpr step_result normalize_task_result(R &&r)
Normalizes a raw task return into scheduler-facing step_result.
constexpr bool is_adapter_descriptor_v
constexpr auto value(T &&v) -> value_t< std::remove_cvref_t< T > >
Wraps a value as an owning spec.
constexpr node_slot_guard(Slots &stored_slots) noexcept
node_slot_guard & operator=(node_slot_guard &&)=delete
constexpr void arm() noexcept
node_slot_guard(const node_slot_guard &)=delete
node_slot_guard & operator=(const node_slot_guard &)=delete
node_slot_guard(node_slot_guard &&)=delete
Represents the basic outcome of a task step.
constexpr bool ok() const noexcept
Returns whether the status is success.
static constexpr step_result success() noexcept
Creates a successful result.