1#ifndef HALIDE_DERIVATIVE_H
2#define HALIDE_DERIVATIVE_H
24 using FuncKey = std::pair<std::string, int>;
41 const std::map<FuncKey, Func> adjoints;
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Defines Func - the front-end handle on a halide function, and related classes.
Helper structure storing the adjoints Func.
Func operator()(const std::string &name) const
Derivative(std::map< FuncKey, Func > &&adjoints_in)
std::pair< std::string, int > FuncKey
Func operator()(const Func &func, int update_id=-1) const
Func operator()(const Buffer<> &buffer) const
Func operator()(const Param<> ¶m) const
Derivative(const std::map< FuncKey, Func > &adjoints_in)
A scalar parameter to a halide pipeline.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Derivative propagate_adjoints(const Func &output, const Func &adjoint, const Region &output_bounds)
Given a Func and a corresponding adjoint, (back)propagate the adjoint to all dependent Funcs,...
Internal::ConstantInterval cast(Type t, const Internal::ConstantInterval &a)
Cast operators for ConstantIntervals.
std::vector< Range > Region
A multi-dimensional box.