Halide
|
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. More... | |
LoopLevel (const Internal::Function &f, const VarOrRVar &v, int stage_index=-1) | |
Identify the loop nest corresponding to some dimension of some function. More... | |
LoopLevel (const Func &f, const VarOrRVar &v, int stage_index=-1) | |
LoopLevel () | |
Construct an undefined LoopLevel. More... | |
void | set (const LoopLevel &other) |
Mutate our contents to match the contents of 'other'. More... | |
LoopLevel & | lock () |
std::string | func () const |
VarOrRVar | var () const |
bool | defined () const |
bool | is_inlined () const |
bool | is_root () 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. More... | |
static LoopLevel | root () |
Construct a special LoopLevel value which represents the location outside of all for loops. More... | |
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 176 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 | ( | ) |
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 |
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 250 of file Schedule.h.