31 [[nodiscard]]
virtual std::vector<OperandDeclaration>
declare_inputs()
const = 0;
38 [[nodiscard]]
virtual std::vector<OperandDeclaration>
declare_outputs()
const = 0;
54 panic(fmt::format(
"op '{}' declared inputs were not satisfied",
name()));
64 [[nodiscard]]
const std::string &
name()
const
A result type that maintains a chainable sequence of errors for debugging and error reporting.
A type-erased container for orchestration operands with runtime type checking.
bool satisfies_declarations(const std::vector< OperandDeclaration > &declarations) const
Validates that the bundle satisfies a set of operand declarations.
Abstract base class for operations in a processing pipeline.
virtual ~Operation()=default
virtual std::vector< OperandDeclaration > declare_outputs() const =0
Declares the output operands produced by this operation.
virtual ChainableResult< OperandBundle > apply(const OperandBundle &inputs)
Applies this operation to the given input operands.
virtual ChainableResult< OperandBundle > execute(const OperandBundle &inputs)=0
Executes the operation's processing logic.
void set_name(const std::string &name)
Sets the name of this operation.
const std::string & name() const
Gets the name of this operation.
virtual std::vector< OperandDeclaration > declare_inputs() const =0
Declares the input operands required by this operation.
void panic(const StringViewSourceLoc &s)
Unconditionally terminates the program with a panic message.