Halide 18.0.0
Halide compiler and libraries
|
An IRVisitor that emits IR to the given output stream in a human readable form. More...
#include <IRPrinter.h>
Public Member Functions | |
IRPrinter (std::ostream &) | |
Construct an IRPrinter pointed at a given output stream (e.g. | |
void | print (const Expr &) |
emit an expression on the output stream | |
void | print_no_parens (const Expr &) |
Emit an expression on the output stream without enclosing parens. | |
void | print (const Stmt &) |
emit a statement on the output stream | |
void | print_list (const std::vector< Expr > &exprs) |
emit a comma delimited list of exprs, without any leading or trailing punctuation. | |
![]() | |
IRVisitor ()=default | |
virtual | ~IRVisitor ()=default |
Static Public Member Functions | |
static void | test () |
Protected Attributes | |
std::ostream & | stream |
The stream on which we're outputting. | |
int | indent = 0 |
The current indentation level, useful for pretty-printing statements. | |
bool | implicit_parens = false |
Certain expressions do not need parens around them, e.g. | |
Scope | known_type |
The symbols whose types can be inferred from values printed already. | |
An IRVisitor that emits IR to the given output stream in a human readable form.
Can be subclassed if you want to modify the way in which it prints.
Definition at line 122 of file IRPrinter.h.
|
explicit |
Construct an IRPrinter pointed at a given output stream (e.g.
std::cout, or a std::ofstream)
Emit an expression on the output stream without enclosing parens.
emit a comma delimited list of exprs, without any leading or trailing punctuation.
|
static |
|
inlineprotected |
Definition at line 144 of file IRPrinter.h.
References indent.
|
protected |
Either emits "(" or "", depending on the value of implicit_parens.
|
protected |
Either emits ")" or "", depending on the value of implicit_parens.
A helper for printing a chain of lets with line breaks.
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.
|
overrideprotectedvirtual |
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 from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
overrideprotectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
|
overrideprotectedvirtual |
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.
|
overrideprotectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
overrideprotectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
Reimplemented from Halide::Internal::IRVisitor.
|
overrideprotectedvirtual |
Reimplemented from Halide::Internal::IRVisitor.
|
protected |
The stream on which we're outputting.
Definition at line 149 of file IRPrinter.h.
|
protected |
The current indentation level, useful for pretty-printing statements.
Definition at line 153 of file IRPrinter.h.
Referenced by get_indent().
Certain expressions do not need parens around them, e.g.
the args to a call are already separated by commas and a surrounding set of parens.
Definition at line 158 of file IRPrinter.h.
|
protected |
The symbols whose types can be inferred from values printed already.
Definition at line 168 of file IRPrinter.h.