Halide
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
 
std::string name
 

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 272 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,
value 
)
inline

◆ 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

◆ ~ScopedBinding()

template<typename T = void>
Halide::Internal::ScopedBinding< T >::~ScopedBinding ( )
inline

◆ 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)
inlinenoexcept

Definition at line 302 of file Scope.h.

Member Function Documentation

◆ bound()

template<typename T = void>
bool Halide::Internal::ScopedBinding< T >::bound ( ) const
inline

Definition at line 290 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

◆ name


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