Halide 22.0.0 Halide compiler and libraries

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Halide::Internal::IRPrinter Class Reference

An IRVisitor that emits IR to the given output stream in a human readable form. More...

`#include <IRPrinter.h>`

Inheritance diagram for Halide::Internal::IRPrinter:

## Public Member Functions
| IRPrinter (std::ostream &)
| Construct an IRPrinter pointed at a given output stream (e.g. More...
void | print (const Expr &)
| emit an expression on the output stream More...
void | print_no_parens (const Expr &)
| Emit an expression on the output stream without enclosing parens. More...
void | print (const Stmt &)
| emit a statement on the output stream More...
void | print_summary (const Stmt &)
| emit a statement summary on the output stream More...
void | print_list (const std::vector< Expr > &exprs)
| emit a comma delimited list of exprs, without any leading or trailing punctuation. More...
Public Member Functions inherited from Halide::Internal::IRVisitor
| IRVisitor ()=default
virtual | ~IRVisitor ()=default

## Static Public Member Functions
static void | test ()

## Protected Member Functions
Indentation | get_indent () const
template<typename T >
Ansi< T > | hl (const T &t)
template<typename T >
Ansi< T > | kw (const T &t)
template<typename T >
Ansi< T > | imm_int (const T &t)
template<typename T >
Ansi< T > | imm_float (const T &t)
template<typename T >
Ansi< T > | imm_str (const T &t)
template<typename T >
Ansi< T > | var (const T &t)
template<typename T >
Ansi< T > | buf (const T &t)
template<typename T >
Ansi< T > | fn (const T &t)
template<typename T >
Ansi< T > | type (const T &t)
template<typename T >
Ansi< T > | typep (const T &t)
template<typename T >
Ansi< T > | paren (const T &t, bool bold=true, int d=-1)
void | open ()
| Either emits "(" or "", depending on the value of implicit_parens. More...
void | close ()
| Either emits ")" or "", depending on the value of implicit_parens. More...
void | openf ()
| Emits "(" always. More...
void | openf (const char *name)
| Emits "name(" always. More...
void | closef ()
| Emits ")" always. More...
void | print_lets (const Let *let)
| A helper for printing a chain of lets with line breaks. More...
void | print_braced_stmt (const Stmt &, int extra_indent=2)
| A helper for printing a braced statement. More...
void | visit (const IntImm *) override
void | visit (const UIntImm *) override
void | visit (const FloatImm *) override
void | visit (const StringImm *) override
void | visit (const Cast *) override
void | visit (const Reinterpret *) override
void | visit (const Variable *) override
void | visit (const Add *) override
void | visit (const Sub *) override
void | visit (const Mul *) override
void | visit (const Div *) override
void | visit (const Mod *) override
void | visit (const Min *) override
void | visit (const Max *) override
void | visit (const EQ *) override
void | visit (const NE *) override
void | visit (const LT *) override
void | visit (const LE *) override
void | visit (const GT *) override
void | visit (const GE *) override
void | visit (const And *) override
void | visit (const Or *) override
void | visit (const Not *) override
void | visit (const Select *) override
void | visit (const Load *) override
void | visit (const Ramp *) override
void | visit (const Broadcast *) override
void | visit (const Call *) override
void | visit (const Let *) override
void | visit (const LetStmt *) override
void | visit (const AssertStmt *) override
void | visit (const ProducerConsumer *) override
void | visit (const For *) override
void | visit (const Acquire *) override
void | visit (const Store *) override
void | visit (const Provide *) override
void | visit (const Allocate *) override
void | visit (const Free *) override
void | visit (const Realize *) override
void | visit (const Block *) override
void | visit (const Fork *) override
void | visit (const IfThenElse *) override
void | visit (const Evaluate *) override
void | visit (const Shuffle *) override
void | visit (const VectorReduce *) override
void | visit (const Prefetch *) override
void | visit (const Atomic *) override
void | visit (const HoistedStorage *) override
virtual void | visit (const IntImm *)
virtual void | visit (const UIntImm *)
virtual void | visit (const FloatImm *)
virtual void | visit (const StringImm *)
virtual void | visit (const Cast *)
virtual void | visit (const Reinterpret *)
virtual void | visit (const Add *)
virtual void | visit (const Sub *)
virtual void | visit (const Mul *)
virtual void | visit (const Div *)
virtual void | visit (const Mod *)
virtual void | visit (const Min *)
virtual void | visit (const Max *)
virtual void | visit (const EQ *)
virtual void | visit (const NE *)
virtual void | visit (const LT *)
virtual void | visit (const LE *)
virtual void | visit (const GT *)
virtual void | visit (const GE *)
virtual void | visit (const And *)
virtual void | visit (const Or *)
virtual void | visit (const Not *)
virtual void | visit (const Select *)
virtual void | visit (const Load *)
virtual void | visit (const Ramp *)
virtual void | visit (const Broadcast *)
virtual void | visit (const Let *)
virtual void | visit (const LetStmt *)
virtual void | visit (const AssertStmt *)
virtual void | visit (const ProducerConsumer *)
virtual void | visit (const Store *)
virtual void | visit (const Provide *)
virtual void | visit (const Allocate *)
virtual void | visit (const Free *)
virtual void | visit (const Realize *)
virtual void | visit (const Block *)
virtual void | visit (const Fork *)
virtual void | visit (const IfThenElse *)
virtual void | visit (const Evaluate *)
virtual void | visit (const Call *)
virtual void | visit (const Variable *)
virtual void | visit (const For *)
virtual void | visit (const Acquire *)
virtual void | visit (const Shuffle *)
virtual void | visit (const Prefetch *)
virtual void | visit (const HoistedStorage *)
virtual void | visit (const Atomic *)
virtual void | visit (const VectorReduce *)

## Protected Attributes
std::ostream & | stream
| The stream on which we're outputting. More...
int | indent = 0
| The current indentation level, useful for pretty-printing statements. More...
bool | implicit_parens = false
| Certain expressions do not need parens around them, e.g. More...
bool | is_summary = false
| Print only a summary of a statement, with sub-statements replaced by ellipses (...). More...
bool | ansi = false
int | paren_depth = 0
const char * | ansi_hl = ""
const char * | ansi_dim = ""
const char * | ansi_kw = ""
const char * | ansi_imm_int = ""
const char * | ansi_imm_float = ""
const char * | ansi_imm_str = ""
const char * | ansi_var = ""
const char * | ansi_buf = ""
const char * | ansi_fn = ""
const char * | ansi_type = ""
const char * | ansi_reset_col = ""
const char * | ansi_reset = ""
Scope | known_type
| The symbols whose types can be inferred from values printed already. More...

## Detailed Description

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 144 of file IRPrinter.h.

## Constructor & Destructor Documentation

## ◆ IRPrinter()

Halide::Internal::IRPrinter::IRPrinter | ( | std::ostream & |  | ) |
| explicit

Construct an IRPrinter pointed at a given output stream (e.g.

std::cout, or a std::ofstream)

## Member Function Documentation

## ◆ print() [1/2]

void Halide::Internal::IRPrinter::print | ( | const Expr & |  | ) |

emit an expression on the output stream

## ◆ print_no_parens()

void Halide::Internal::IRPrinter::print_no_parens | ( | const Expr & |  | ) |

Emit an expression on the output stream without enclosing parens.

## ◆ print() [2/2]

void Halide::Internal::IRPrinter::print | ( | const Stmt & |  | ) |

emit a statement on the output stream

## ◆ print_summary()

void Halide::Internal::IRPrinter::print_summary | ( | const Stmt & |  | ) |

emit a statement summary on the output stream

## ◆ print_list()

void Halide::Internal::IRPrinter::print_list | ( | const std::vector< Expr > & | exprs | ) |

emit a comma delimited list of exprs, without any leading or trailing punctuation.

## ◆ test()

static void Halide::Internal::IRPrinter::test | ( |  | ) |
| static

## ◆ get_indent()

Indentation Halide::Internal::IRPrinter::get_indent | ( |  | ) | const
| inline protected

Definition at line 169 of file IRPrinter.h.

References indent.

## ◆ hl()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::hl | ( | const T & | t | ) |
| protected

## ◆ kw()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::kw | ( | const T & | t | ) |
| protected

## ◆ imm_int()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::imm_int | ( | const T & | t | ) |
| protected

## ◆ imm_float()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::imm_float | ( | const T & | t | ) |
| protected

## ◆ imm_str()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::imm_str | ( | const T & | t | ) |
| protected

## ◆ var()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::var | ( | const T & | t | ) |
| protected

## ◆ buf()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::buf | ( | const T & | t | ) |
| protected

## ◆ fn()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::fn | ( | const T & | t | ) |
| protected

## ◆ type()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::type | ( | const T & | t | ) |
| protected

## ◆ typep()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::typep | ( | const T & | t | ) |
| protected

## ◆ paren()

template<typename T >

Ansi< T > Halide::Internal::IRPrinter::paren | ( | const T & | t,
|  | bool | bold = `true`,
|  | int | d = `-1`
| ) |  |
| protected

## ◆ open()

void Halide::Internal::IRPrinter::open | ( |  | ) |
| protected

Either emits "(" or "", depending on the value of implicit_parens.

## ◆ close()

void Halide::Internal::IRPrinter::close | ( |  | ) |
| protected

Either emits ")" or "", depending on the value of implicit_parens.

## ◆ openf() [1/2]

void Halide::Internal::IRPrinter::openf | ( |  | ) |
| protected

Emits "(" always.

## ◆ openf() [2/2]

void Halide::Internal::IRPrinter::openf | ( | const char * | name | ) |
| protected

Emits "name(" always.

## ◆ closef()

void Halide::Internal::IRPrinter::closef | ( |  | ) |
| protected

Emits ")" always.

## ◆ print_lets()

void Halide::Internal::IRPrinter::print_lets | ( | const Let * | let | ) |
| protected

A helper for printing a chain of lets with line breaks.

## ◆ print_braced_stmt()

void Halide::Internal::IRPrinter::print_braced_stmt | ( | const Stmt & | ,
|  | int | extra_indent = `2`
| ) |  |
| protected

A helper for printing a braced statement.

## ◆ visit() [1/48]

void Halide::Internal::IRPrinter::visit | ( | const IntImm * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [2/48]

void Halide::Internal::IRPrinter::visit | ( | const UIntImm * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [3/48]

void Halide::Internal::IRPrinter::visit | ( | const FloatImm * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [4/48]

void Halide::Internal::IRPrinter::visit | ( | const StringImm * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [5/48]

void Halide::Internal::IRPrinter::visit | ( | const Cast * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [6/48]

void Halide::Internal::IRPrinter::visit | ( | const Reinterpret * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [7/48]

void Halide::Internal::IRPrinter::visit | ( | const Variable * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [8/48]

void Halide::Internal::IRPrinter::visit | ( | const Add * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [9/48]

void Halide::Internal::IRPrinter::visit | ( | const Sub * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [10/48]

void Halide::Internal::IRPrinter::visit | ( | const Mul * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [11/48]

void Halide::Internal::IRPrinter::visit | ( | const Div * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [12/48]

void Halide::Internal::IRPrinter::visit | ( | const Mod * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [13/48]

void Halide::Internal::IRPrinter::visit | ( | const Min * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [14/48]

void Halide::Internal::IRPrinter::visit | ( | const Max * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [15/48]

void Halide::Internal::IRPrinter::visit | ( | const EQ * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [16/48]

void Halide::Internal::IRPrinter::visit | ( | const NE * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [17/48]

void Halide::Internal::IRPrinter::visit | ( | const LT * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [18/48]

void Halide::Internal::IRPrinter::visit | ( | const LE * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [19/48]

void Halide::Internal::IRPrinter::visit | ( | const GT * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [20/48]

void Halide::Internal::IRPrinter::visit | ( | const GE * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [21/48]

void Halide::Internal::IRPrinter::visit | ( | const And * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [22/48]

void Halide::Internal::IRPrinter::visit | ( | const Or * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [23/48]

void Halide::Internal::IRPrinter::visit | ( | const Not * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [24/48]

void Halide::Internal::IRPrinter::visit | ( | const Select * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [25/48]

void Halide::Internal::IRPrinter::visit | ( | const Load * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [26/48]

void Halide::Internal::IRPrinter::visit | ( | const Ramp * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [27/48]

void Halide::Internal::IRPrinter::visit | ( | const Broadcast * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [28/48]

void Halide::Internal::IRPrinter::visit | ( | const Call * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [29/48]

void Halide::Internal::IRPrinter::visit | ( | const Let * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [30/48]

void Halide::Internal::IRPrinter::visit | ( | const LetStmt * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [31/48]

void Halide::Internal::IRPrinter::visit | ( | const AssertStmt * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [32/48]

void Halide::Internal::IRPrinter::visit | ( | const ProducerConsumer * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [33/48]

void Halide::Internal::IRPrinter::visit | ( | const For * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [34/48]

void Halide::Internal::IRPrinter::visit | ( | const Acquire * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [35/48]

void Halide::Internal::IRPrinter::visit | ( | const Store * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [36/48]

void Halide::Internal::IRPrinter::visit | ( | const Provide * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [37/48]

void Halide::Internal::IRPrinter::visit | ( | const Allocate * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [38/48]

void Halide::Internal::IRPrinter::visit | ( | const Free * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [39/48]

void Halide::Internal::IRPrinter::visit | ( | const Realize * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [40/48]

void Halide::Internal::IRPrinter::visit | ( | const Block * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [41/48]

void Halide::Internal::IRPrinter::visit | ( | const Fork * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [42/48]

void Halide::Internal::IRPrinter::visit | ( | const IfThenElse * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [43/48]

void Halide::Internal::IRPrinter::visit | ( | const Evaluate * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [44/48]

void Halide::Internal::IRPrinter::visit | ( | const Shuffle * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [45/48]

void Halide::Internal::IRPrinter::visit | ( | const VectorReduce * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [46/48]

void Halide::Internal::IRPrinter::visit | ( | const Prefetch * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [47/48]

void Halide::Internal::IRPrinter::visit | ( | const Atomic * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, Halide::Internal::CodeGen_GPU_C, and Halide::Internal::CodeGen_GPU_C.

## ◆ visit() [48/48]

void Halide::Internal::IRPrinter::visit | ( | const HoistedStorage * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Reimplemented in Halide::Internal::CodeGen_C, and Halide::Internal::CodeGen_GPU_C.

## Member Data Documentation

## ◆ stream

std::ostream& Halide::Internal::IRPrinter::stream
| protected

The stream on which we're outputting.

Definition at line 174 of file IRPrinter.h.

## ◆ indent

int Halide::Internal::IRPrinter::indent = 0
| protected

The current indentation level, useful for pretty-printing statements.

Definition at line 178 of file IRPrinter.h.

Referenced by get_indent().

## ◆ implicit_parens

bool Halide::Internal::IRPrinter::implicit_parens = false
| protected

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 183 of file IRPrinter.h.

## ◆ is_summary

bool Halide::Internal::IRPrinter::is_summary = false
| protected

Print only a summary of a statement, with sub-statements replaced by ellipses (...).

Definition at line 187 of file IRPrinter.h.

## ◆ ansi

bool Halide::Internal::IRPrinter::ansi = false
| protected

Definition at line 189 of file IRPrinter.h.

## ◆ paren_depth

int Halide::Internal::IRPrinter::paren_depth = 0
| protected

Definition at line 190 of file IRPrinter.h.

## ◆ ansi_hl

const char* Halide::Internal::IRPrinter::ansi_hl = ""
| protected

Definition at line 192 of file IRPrinter.h.

## ◆ ansi_dim

const char* Halide::Internal::IRPrinter::ansi_dim = ""
| protected

Definition at line 193 of file IRPrinter.h.

## ◆ ansi_kw

const char* Halide::Internal::IRPrinter::ansi_kw = ""
| protected

Definition at line 194 of file IRPrinter.h.

## ◆ ansi_imm_int

const char* Halide::Internal::IRPrinter::ansi_imm_int = ""
| protected

Definition at line 195 of file IRPrinter.h.

## ◆ ansi_imm_float

const char* Halide::Internal::IRPrinter::ansi_imm_float = ""
| protected

Definition at line 196 of file IRPrinter.h.

## ◆ ansi_imm_str

const char* Halide::Internal::IRPrinter::ansi_imm_str = ""
| protected

Definition at line 197 of file IRPrinter.h.

## ◆ ansi_var

const char* Halide::Internal::IRPrinter::ansi_var = ""
| protected

Definition at line 198 of file IRPrinter.h.

## ◆ ansi_buf

const char* Halide::Internal::IRPrinter::ansi_buf = ""
| protected

Definition at line 199 of file IRPrinter.h.

## ◆ ansi_fn

const char* Halide::Internal::IRPrinter::ansi_fn = ""
| protected

Definition at line 200 of file IRPrinter.h.

## ◆ ansi_type

const char* Halide::Internal::IRPrinter::ansi_type = ""
| protected

Definition at line 201 of file IRPrinter.h.

## ◆ ansi_reset_col

const char* Halide::Internal::IRPrinter::ansi_reset_col = ""
| protected

Definition at line 202 of file IRPrinter.h.

## ◆ ansi_reset

const char* Halide::Internal::IRPrinter::ansi_reset = ""
| protected

Definition at line 203 of file IRPrinter.h.

## ◆ known_type

Scope Halide::Internal::IRPrinter::known_type
| protected

The symbols whose types can be inferred from values printed already.

Definition at line 236 of file IRPrinter.h.

The documentation for this class was generated from the following file:

- src/IRPrinter.h