|
Halide 20.0.0
Halide compiler and libraries
|
A helper class to manage closures. More...
#include <Closure.h>
Classes | |
| struct | Buffer |
| Information about a buffer reference from a closure. More... | |
Public Member Functions | |
| Closure ()=default | |
| Closure (const Closure &)=delete | |
| Closure & | operator= (const Closure &)=delete |
| Closure (Closure &&)=default | |
| Closure & | operator= (Closure &&)=default |
| void | include (const Stmt &s, const std::string &loop_variable="") |
| Traverse a statement and find all references to external symbols. | |
| Expr | pack_into_struct () const |
| Pack a closure into a struct. | |
| Stmt | unpack_from_struct (const Expr &, const Stmt &) const |
| Unpack a closure around a Stmt, putting all the names in scope. | |
Public Member Functions inherited from Halide::Internal::IRVisitor | |
| IRVisitor ()=default | |
| virtual | ~IRVisitor ()=default |
Public Attributes | |
| std::map< std::string, Type > | vars |
| External variables referenced. | |
| std::map< std::string, Buffer > | buffers |
| External allocations referenced. | |
Protected Attributes | |
| Scope | ignore |
A helper class to manage closures.
Walks over a statement and retrieves all the references within it to external symbols (variables and allocations). It then helps you build a struct containing the current values of these symbols that you can use as a closure if you want to migrate the body of the statement to its own function (e.g. because it's the body of a parallel for loop.
|
default |
|
default |
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented in Halide::Internal::HostClosure.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
protected |
Traverse a statement and find all references to external symbols.
When the closure encounters a read or write to 'foo', it assumes that the host pointer is found in the symbol table as 'foo.host', and any halide_buffer_t pointer is found under 'foo.buffer'.
Calling this multiple times (on multiple statements) is legal (and will produce a unified closure).
| Expr Halide::Internal::Closure::pack_into_struct | ( | ) | const |
Pack a closure into a struct.
Unpack a closure around a Stmt, putting all the names in scope.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
protectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented in Halide::Internal::HostClosure.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
protectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
|
protectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented in Halide::Internal::HostClosure.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
protectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
protectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
protectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
| std::map<std::string, Type> Halide::Internal::Closure::vars |
| std::map<std::string, Buffer> Halide::Internal::Closure::buffers |