Go to the documentation of this file. 1 #ifndef HALIDE_DERIVATIVE_H
2 #define HALIDE_DERIVATIVE_H
24 using FuncKey = std::pair<std::string, int>;
26 explicit Derivative(
const std::map<FuncKey, Func> &adjoints_in)
27 : adjoints(adjoints_in) {
29 explicit Derivative(std::map<FuncKey, Func> &&adjoints_in)
30 : adjoints(std::move(adjoints_in)) {
41 const std::map<FuncKey, Func> adjoints;
54 const Region &output_bounds);
63 const Buffer<float> &adjoint);
Derivative(const std::map< FuncKey, Func > &adjoints_in)
std::vector< Range > Region
A multi-dimensional box.
Derivative(std::map< FuncKey, Func > &&adjoints_in)
std::pair< std::string, int > FuncKey
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Func operator()(const Func &func, int update_id=-1) const
Helper structure storing the adjoints Func.
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,...
A scalar parameter to a halide pipeline.