Go to the documentation of this file. 1 #ifndef HALIDE_IR_PRINTER_H
2 #define HALIDE_IR_PRINTER_H
27 std::ostream &
operator<<(std::ostream &stream,
const Expr &);
31 std::ostream &
operator<<(std::ostream &stream,
const Type &);
35 std::ostream &
operator<<(std::ostream &stream,
const Module &);
47 std::ostream &
operator<<(std::ostream &stream,
const LoopLevel &);
51 std::ostream &
operator<<(std::ostream &stream,
const Target &);
55 struct AssociativePattern;
61 std::ostream &
operator<<(std::ostream &stream,
const AssociativePattern &);
65 std::ostream &
operator<<(std::ostream &stream,
const AssociativeOp &);
69 std::ostream &
operator<<(std::ostream &stream,
const Stmt &);
82 std::ostream &
operator<<(std::ostream &stream,
const LoweredFunc &);
91 std::ostream &
operator<<(std::ostream &out,
const Closure &c);
119 void print_list(
const std::vector<Expr> &exprs);
167 void visit(
const EQ *)
override;
168 void visit(
const NE *)
override;
169 void visit(
const LT *)
override;
170 void visit(
const LE *)
override;
171 void visit(
const GT *)
override;
172 void visit(
const GE *)
override;
174 void visit(
const Or *)
override;
std::ostream & stream
The stream on which we're outputting.
Allocate a scratch area called with the given name, type, and size.
The sum of two expressions.
void print_lets(const Let *let)
A helper for printing a chain of lets with line breaks.
std::ostream & operator<<(std::ostream &stream, const Stmt &)
Emit a halide statement on an output stream (such as std::cout) in a human-readable form.
Horizontally reduce a vector to a scalar or narrower vector using the given commutative and associati...
Is the first expression greater than or equal to the second.
A base class for algorithms that need to recursively walk over the IR.
DimType
Each Dim below has a dim_type, which tells you what transformations are legal on it.
Floating point constants.
An IRVisitor that emits IR to the given output stream in a human readable form.
A vector with 'lanes' elements, in which every element is 'value'.
The ratio of two expressions.
ForType
An enum describing a type of loop traversal.
The statement form of a let node.
A common pattern when traversing Halide IR is that you need to keep track of stuff when you find a Le...
The actual IR nodes begin here.
Is the first expression less than or equal to the second.
IRPrinter(std::ostream &)
Construct an IRPrinter pointed at a given output stream (e.g.
Is the first expression not equal to the second.
bool implicit_parens
Certain expressions do not need parens around them, e.g.
A pair of statements executed concurrently.
TailStrategy
Different ways to handle a tail case in a split when the factor does not provably divide the extent.
A reference-counted handle to a statement node.
Load a value from a named symbol if predicate is true.
Free the resources associated with the given buffer.
Allocate a multi-dimensional buffer of the given type and size.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Logical or - is at least one of the expression true.
Is the first expression equal to the second.
This defines the value of a function at a multi-dimensional location.
@ Internal
Not visible externally, similar to 'static' linkage in C.
The greater of two values.
LinkageType
Type of linkage a function in a lowered Halide module can have.
void close()
Either emits ")" or "", depending on the value of implicit_parens.
A let expression, like you might find in a functional language.
A linear ramp vector node.
void visit(const IntImm *) override
void print_list(const std::vector< Expr > &exprs)
emit a comma delimited list of exprs, without any leading or trailing punctuation.
Evaluate and discard an expression, presumably because it has some side-effect.
void print(const Expr &)
emit an expression on the output stream
Store a 'value' to the buffer called 'name' at a given 'index' if 'predicate' is true.
Indentation get_indent() const
NameMangling
An enum to specify calling convention for extern stages.
The lesser of two values.
This node is a helpful annotation to do with permissions.
void open()
Either emits "(" or "", depending on the value of implicit_parens.
int indent
The current indentation level, useful for pretty-printing statements.
If the 'condition' is false, then evaluate and return the message, which should be a call to an error...
std::ostream & operator<<(std::ostream &stream, const Expr &)
Emit an expression on an output stream (such as std::cout) in human-readable form.
Reinterpret value as another type, without affecting any of the bits (on little-endian systems).
A fragment of Halide syntax.
Represent a multi-dimensional region of a Func or an ImageParam that needs to be prefetched.
Is the first expression greater than the second.
MemoryType
An enum describing different address spaces to be used with Func::store_in.
Lock all the Store nodes in the body statement.
Construct a new vector by taking elements from another sequence of vectors.
void print_no_parens(const Expr &)
Emit an expression on the output stream without enclosing parens.
Unsigned integer constants.
The difference of two expressions.
Logical and - are both expressions true.
Logical not - true if the expression false.
Is the first expression less than the second.
DeviceAPI
An enum describing a type of device API.
The product of two expressions.
A sequence of statements to be executed in-order.
Scope known_type
The symbols whose types can be inferred from values printed already.