A common pattern when traversing Halide IR is that you need to keep track of stuff when you find a Let or a LetStmt, and that it should hide previous values with the same name until you leave the Let or LetStmt nodes This class helps with that.
More...
#include <ModulusRemainder.h>
|
| Scope ()=default |
|
| Scope (Scope &&that) noexcept=default |
|
Scope & | operator= (Scope &&that) noexcept=default |
|
| Scope (const Scope< T > &)=delete |
|
Scope< T > & | operator= (const Scope< T > &)=delete |
|
void | set_containing_scope (const Scope< T > *s) |
| Set the parent scope. More...
|
|
template<typename T2 = T, typename = typename std::enable_if<!std::is_same<T2, void>::value>::type> |
T2 | get (const std::string &name) const |
| Retrieve the value referred to by a name. More...
|
|
template<typename T2 = T, typename = typename std::enable_if<!std::is_same<T2, void>::value>::type> |
T2 & | ref (const std::string &name) |
| Return a reference to an entry. More...
|
|
bool | contains (const std::string &name) const |
| Tests if a name is in scope. More...
|
|
size_t | count (const std::string &name) const |
| How many nested definitions of a single name exist? More...
|
|
template<typename T2 = T, typename = typename std::enable_if<!std::is_same<T2, void>::value>::type> |
void | push (const std::string &name, T2 &&value) |
| Add a new (name, value) pair to the current scope. More...
|
|
template<typename T2 = T, typename = typename std::enable_if<std::is_same<T2, void>::value>::type> |
void | push (const std::string &name) |
|
void | pop (const std::string &name) |
| A name goes out of scope. More...
|
|
const_iterator | cbegin () const |
|
const_iterator | cend () const |
|
void | swap (Scope< T > &other) |
|
template<typename T = void>
class Halide::Internal::Scope< T >
A common pattern when traversing Halide IR is that you need to keep track of stuff when you find a Let or a LetStmt, and that it should hide previous values with the same name until you leave the Let or LetStmt nodes This class helps with that.
Definition at line 17 of file ModulusRemainder.h.
◆ Scope() [1/3]
template<typename T = void>
◆ Scope() [2/3]
template<typename T = void>
◆ Scope() [3/3]
template<typename T = void>
◆ operator=() [1/2]
template<typename T = void>
◆ operator=() [2/2]
template<typename T = void>
◆ set_containing_scope()
template<typename T = void>
◆ empty_scope()
template<typename T = void>
A const ref to an empty scope.
Useful for default function arguments, which would otherwise require a copy constructor (with llvm in c++98 mode)
Definition at line 120 of file Scope.h.
◆ get()
template<typename T = void>
template<typename T2 = T, typename = typename std::enable_if<!std::is_same<T2, void>::value>::type>
Retrieve the value referred to by a name.
Definition at line 128 of file Scope.h.
◆ ref()
template<typename T = void>
template<typename T2 = T, typename = typename std::enable_if<!std::is_same<T2, void>::value>::type>
Return a reference to an entry.
Does not consider the containing scope.
Definition at line 144 of file Scope.h.
◆ contains()
template<typename T = void>
Tests if a name is in scope.
Definition at line 154 of file Scope.h.
◆ count()
template<typename T = void>
How many nested definitions of a single name exist?
Definition at line 167 of file Scope.h.
◆ push() [1/2]
template<typename T = void>
template<typename T2 = T, typename = typename std::enable_if<!std::is_same<T2, void>::value>::type>
◆ push() [2/2]
template<typename T = void>
template<typename T2 = T, typename = typename std::enable_if<std::is_same<T2, void>::value>::type>
◆ pop()
template<typename T = void>
A name goes out of scope.
Restore whatever its old value was (or remove it entirely if there was nothing else of the same name in an outer scope)
Definition at line 194 of file Scope.h.
◆ cbegin()
template<typename T = void>
◆ cend()
template<typename T = void>
◆ swap()
template<typename T = void>
The documentation for this class was generated from the following files: