Halide 19.0.0
Halide compiler and libraries
|
A reference to a site in a Halide statement at the top of the body of a particular for loop. More...
#include <Schedule.h>
Public Member Functions | |
int | stage_index () const |
Return the index of the function stage associated with this loop level. | |
LoopLevel (const Internal::Function &f, const VarOrRVar &v, int stage_index=-1) | |
Identify the loop nest corresponding to some dimension of some function. | |
LoopLevel (const Func &f, const VarOrRVar &v, int stage_index=-1) | |
LoopLevel () | |
Construct an undefined LoopLevel. | |
LoopLevel (const std::string &func_name, const std::string &var_name, bool is_rvar, int stage_index, bool locked=false) | |
For deserialization only. | |
void | set (const LoopLevel &other) |
Mutate our contents to match the contents of 'other'. | |
LoopLevel & | lock () |
std::string | func () const |
VarOrRVar | var () const |
bool | defined () const |
bool | is_inlined () const |
bool | is_root () const |
int | get_stage_index () const |
std::string | func_name () const |
std::string | var_name () const |
bool | is_rvar () const |
bool | locked () const |
std::string | to_string () const |
bool | match (const std::string &loop) const |
bool | match (const LoopLevel &other) const |
bool | operator== (const LoopLevel &other) const |
bool | operator!= (const LoopLevel &other) const |
Static Public Member Functions | |
static LoopLevel | inlined () |
Construct a special LoopLevel value that implies that a function should be inlined away. | |
static LoopLevel | root () |
Construct a special LoopLevel value which represents the location outside of all for loops. | |
A reference to a site in a Halide statement at the top of the body of a particular for loop.
Evaluating a region of a halide function is done by generating a loop nest that spans its dimensions. We schedule the inputs to that function by recursively injecting realizations for them at particular sites in this loop nest. A LoopLevel identifies such a site. The site can either be a loop nest within all stages of a function or it can refer to a loop nest within a particular function's stage (initial definition or updates).
Note that a LoopLevel is essentially a pointer to an underlying value; all copies of a LoopLevel refer to the same site, so mutating one copy (via the set() method) will effectively mutate all copies:
This is quite useful when splitting Halide code into utility libraries, as it allows a library to schedule code according to a caller's specifications, even if the caller hasn't fully defined its pipeline yet:
Definition at line 203 of file Schedule.h.
Halide::LoopLevel::LoopLevel | ( | const Internal::Function & | f, |
const VarOrRVar & | v, | ||
int | stage_index = -1 ) |
Identify the loop nest corresponding to some dimension of some function.
Halide::LoopLevel::LoopLevel | ( | ) |
Halide::LoopLevel::LoopLevel | ( | const std::string & | func_name, |
const std::string & | var_name, | ||
bool | is_rvar, | ||
int | stage_index, | ||
bool | locked = false ) |
For deserialization only.
int Halide::LoopLevel::stage_index | ( | ) | const |
Return the index of the function stage associated with this loop level.
Asserts if undefined
|
static |
Construct a special LoopLevel value that implies that a function should be inlined away.
Referenced by Halide::Internal::GeneratorParam_LoopLevel::set_from_string().
|
static |
Construct a special LoopLevel value which represents the location outside of all for loops.
Referenced by Halide::Internal::GeneratorParam_LoopLevel::set_from_string().
void Halide::LoopLevel::set | ( | const LoopLevel & | other | ) |
Mutate our contents to match the contents of 'other'.
Referenced by Halide::Internal::GeneratorParam_LoopLevel::get_default_value(), and Halide::Internal::GeneratorParam_LoopLevel::set().
LoopLevel & Halide::LoopLevel::lock | ( | ) |
std::string Halide::LoopLevel::func | ( | ) | const |
VarOrRVar Halide::LoopLevel::var | ( | ) | const |
bool Halide::LoopLevel::defined | ( | ) | const |
bool Halide::LoopLevel::is_inlined | ( | ) | const |
bool Halide::LoopLevel::is_root | ( | ) | const |
int Halide::LoopLevel::get_stage_index | ( | ) | const |
std::string Halide::LoopLevel::func_name | ( | ) | const |
std::string Halide::LoopLevel::var_name | ( | ) | const |
bool Halide::LoopLevel::is_rvar | ( | ) | const |
bool Halide::LoopLevel::locked | ( | ) | const |
std::string Halide::LoopLevel::to_string | ( | ) | const |
bool Halide::LoopLevel::match | ( | const std::string & | loop | ) | const |
bool Halide::LoopLevel::match | ( | const LoopLevel & | other | ) | const |
bool Halide::LoopLevel::operator== | ( | const LoopLevel & | other | ) | const |
|
inline |
Definition at line 294 of file Schedule.h.