28#include <unordered_map>
63 void updatePipeline(std::vector<Operations::OperationDescriptor> operations);
78 std::vector<Operations::OperationDescriptor>&& operations,
105 virtual void applyScheduling(Halide::Func& pipeline, Halide::Var& x, Halide::Var& y, Halide::Var& c)
const = 0;
107 [[nodiscard]]
bool executeOnHalideBuffer(Halide::Buffer<float>& input_buffer, Halide::Buffer<float>& output_buffer)
override;
118 [[nodiscard]] Halide::Func
applyOperations(
const Halide::Func& input,
const Halide::Var& x,
const Halide::Var& y,
const Halide::Var& c);
144 std::vector<Operations::OperationDescriptor> m_operations;
160 std::unordered_map<uint64_t, Halide::Param<float>> m_pipeline_params;
Factory Pattern - creates operations from OperationDescriptor.
Base class for Halide executors providing shared 4-channel input parameter.
Abstract interface for executing a pre-compiled Halide pipeline.
Concrete executor for fused Halide adjustment pipelines.
virtual void buildOperationChain()=0
Builds the Halide function graph based on m_operations.
bool m_chain_built
Flag indicating if the pipeline has been successfully built and compiled.
Halide::Func applyOperations(const Halide::Func &input, const Halide::Var &x, const Halide::Var &y, const Halide::Var &c)
Applies all operations to the input function.
OperationPipelineExecutor()
Default Constructor.
void init(std::vector< Operations::OperationDescriptor > &&operations, const Operations::OperationFactory &factory)
Initializes the executor with a moved list of operations (Optimized).
virtual void applyScheduling(Halide::Func &pipeline, Halide::Var &x, Halide::Var &y, Halide::Var &c) const =0
Applies scheduling directives (Vectorization/Parallelism/GPU tiling).
bool executeOnHalideBuffer(Halide::Buffer< float > &input_buffer, Halide::Buffer< float > &output_buffer) override
Executes the compiled pipeline directly on a Halide buffer.
void updateRuntimeParams(std::vector< Operations::OperationDescriptor > &&operations)
Updates the runtime values of the cached parameters WITHOUT recompiling.
Halide::Pipeline m_pipeline
The compiled Halide pipeline object.
void updatePipeline(std::vector< Operations::OperationDescriptor > operations)
Updates the list of operations and rebuilds the graph.
virtual ~OperationPipelineExecutor()=default
Destructor.
Abstract base class for Halide-optimized pipeline executors.
Abstract interface for executing a compiled image processing pipeline.
Enum representing the memory type where image data is stored (CPU or GPU).
Manages the lifecycle of a single IWorkingImage instance.
Descriptor of an operation with its parameters and unique identifier.
Factory for creating operations (Dependency Injection)