Halide 19.0.0
Halide compiler and libraries
|
A for loop. More...
#include <IR.h>
Public Member Functions | |
bool | is_unordered_parallel () const |
bool | is_parallel () const |
Public Member Functions inherited from Halide::Internal::StmtNode< For > | |
void | accept (IRVisitor *v) const override |
We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors. | |
Stmt | mutate_stmt (IRMutator *v) const override |
StmtNode () | |
~StmtNode () override=default | |
Public Member Functions inherited from Halide::Internal::BaseStmtNode | |
BaseStmtNode (IRNodeType t) | |
Public Member Functions inherited from Halide::Internal::IRNode | |
IRNode (IRNodeType t) | |
virtual | ~IRNode ()=default |
Static Public Member Functions | |
static Stmt | make (const std::string &name, Expr min, Expr extent, ForType for_type, Partition partition_policy, DeviceAPI device_api, Stmt body) |
Public Attributes | |
std::string | name |
Expr | min |
Expr | extent |
ForType | for_type |
DeviceAPI | device_api |
Stmt | body |
Partition | partition_policy |
Public Attributes inherited from Halide::Internal::IRNode | |
RefCount | ref_count |
These classes are all managed with intrusive reference counting, so we also track a reference count. | |
IRNodeType | node_type |
Each IR node subclass has a unique identifier. | |
Static Public Attributes | |
static const IRNodeType | _node_type = IRNodeType::For |
A for loop.
Execute the 'body' statement for all values of the variable 'name' from 'min' to 'min + extent'. There are four types of For nodes. A 'Serial' for loop is a conventional one. In a 'Parallel' for loop, each iteration of the loop happens in parallel or in some unspecified order. In a 'Vectorized' for loop, each iteration maps to one SIMD lane, and the whole loop is executed in one shot. For this case, 'extent' must be some small integer constant (probably 4, 8, or 16). An 'Unrolled' for loop compiles to a completely unrolled version of the loop. Each iteration becomes its own statement. Again in this case, 'extent' should be a small integer constant.
|
static |
|
inline |
Definition at line 833 of file IR.h.
References for_type, and Halide::Internal::is_unordered_parallel().
|
inline |
Definition at line 836 of file IR.h.
References for_type, and Halide::Internal::is_parallel().
ForType Halide::Internal::For::for_type |
Definition at line 822 of file IR.h.
Referenced by is_parallel(), and is_unordered_parallel().
|
static |