Halide 22.0.0 Halide compiler and libraries

Public Member Functions | Public Attributes | List of all members
Halide::Internal::ScopedBinding< T > Struct Template Reference

Helper class for pushing/popping Scope<> values, to allow for early-exit in Visitor/Mutators that preserves correctness. More...

`#include <Scope.h>`

## Public Member Functions
| ScopedBinding ()=default
| ScopedBinding (Scope< T > &s, const std::string &n, T value)
| ScopedBinding (bool condition, Scope< T > &s, const std::string &n, const T &value)
bool | bound () const
| ~ScopedBinding ()
| ScopedBinding (const ScopedBinding &that)=delete
| ScopedBinding (ScopedBinding &&that) noexcept
void | operator= (const ScopedBinding &that)=delete
void | operator= (ScopedBinding &&that)=delete

## Public Attributes
Scope< T > * | scope = nullptr
Scope< T >::PushToken | token

## Detailed Description

template<typename T = void>
struct Halide::Internal::ScopedBinding< T >

Helper class for pushing/popping Scope<> values, to allow for early-exit in Visitor/Mutators that preserves correctness.

Note that this name can be a bit confusing, since there are two "scopes" involved here:

- the Scope object itself
- the lifetime of this helper object The "Scoped" in this class name refers to the latter, as it temporarily binds a name within the scope of this helper's lifetime.

Definition at line 326 of file Scope.h.

## Constructor & Destructor Documentation

## ◆ ScopedBinding() [1/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( |  | ) |
| default

## ◆ ScopedBinding() [2/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | Scope< T > & | s,
|  | const std::string & | n,
|  | T | value
| ) |  |
| inline

Definition at line 332 of file Scope.h.

## ◆ ScopedBinding() [3/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | bool | condition,
|  | Scope< T > & | s,
|  | const std::string & | n,
|  | const T & | value
| ) |  |
| inline

Definition at line 336 of file Scope.h.

## ◆ ~ScopedBinding()

template<typename T = void>

Halide::Internal::ScopedBinding< T >::~ScopedBinding | ( |  | ) |
| inline

Definition at line 345 of file Scope.h.

References Halide::Internal::ScopedBinding< T >::scope, and Halide::Internal::ScopedBinding< T >::token.

## ◆ ScopedBinding() [4/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | const ScopedBinding< T > & | that | ) |
| delete

## ◆ ScopedBinding() [5/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | ScopedBinding< T > && | that | ) |
| inline noexcept

Definition at line 353 of file Scope.h.

## Member Function Documentation

## ◆ bound()

template<typename T = void>

bool Halide::Internal::ScopedBinding< T >::bound | ( |  | ) | const
| inline

Definition at line 341 of file Scope.h.

References Halide::Internal::ScopedBinding< T >::scope.

## ◆ operator=() [1/2]

template<typename T = void>

void Halide::Internal::ScopedBinding< T >::operator= | ( | const ScopedBinding< T > & | that | ) |
| delete

## ◆ operator=() [2/2]

template<typename T = void>

void Halide::Internal::ScopedBinding< T >::operator= | ( | ScopedBinding< T > && | that | ) |
| delete

## Member Data Documentation

## ◆ scope

template<typename T = void>

Scope<T>* Halide::Internal::ScopedBinding< T >::scope = nullptr

Definition at line 327 of file Scope.h.

Referenced by Halide::Internal::ScopedBinding< T >::bound(), Halide::Internal::ScopedBinding< T >::~ScopedBinding(), and Halide::Internal::ScopedBinding< void >::~ScopedBinding().

## ◆ token

template<typename T = void>

Scope<T>::PushToken Halide::Internal::ScopedBinding< T >::token

Definition at line 328 of file Scope.h.

Referenced by Halide::Internal::ScopedBinding< T >::~ScopedBinding(), and Halide::Internal::ScopedBinding< void >::~ScopedBinding().

The documentation for this struct was generated from the following file:

- src/Scope.h