Halide
Halide::Expr Struct Reference

A fragment of Halide syntax. More...

#include <Expr.h>

Inherits Halide::Internal::IRHandle.

Public Member Functions

HALIDE_ALWAYS_INLINE Expr ()=default
 Make an undefined expression. More...
 
HALIDE_ALWAYS_INLINE Expr (const Internal::BaseExprNode *n)
 Make an expression from a concrete expression node pointer (e.g. More...
 
 Expr (int8_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (int16_t x)
 
 Expr (int32_t x)
 
 Expr (int64_t x)
 
 Expr (uint8_t x)
 
 Expr (uint16_t x)
 
 Expr (uint32_t x)
 
 Expr (uint64_t x)
 
 Expr (float16_t x)
 
 Expr (bfloat16_t x)
 
 Expr (float x)
 
 Expr (double x)
 
 Expr (const std::string &s)
 Make an expression representing a const string (i.e. More...
 
const HALIDE_ALWAYS_INLINE Internal::BaseExprNodeget () const
 Override get() to return a BaseExprNode * instead of an IRNode *. More...
 
HALIDE_ALWAYS_INLINE Type type () const
 Get the type of this expression node. More...
 
- Public Member Functions inherited from Halide::Internal::IRHandle
HALIDE_ALWAYS_INLINE IRHandle ()=default
 
HALIDE_ALWAYS_INLINE IRHandle (const IRNode *p)
 
void accept (IRVisitor *v) const
 Dispatch to the correct visitor method for this node. More...
 
template<typename T >
const T * as () const
 Downcast this ir node to its actual type (e.g. More...
 
IRNodeType node_type () const
 
- Public Member Functions inherited from Halide::Internal::IntrusivePtr< const IRNode >
const IRNodeget () const
 Access the raw pointer in a variety of ways. More...
 
const IRNodeoperator* () const
 
const IRNodeoperator-> () const
 
 ~IntrusivePtr ()
 
HALIDE_ALWAYS_INLINE IntrusivePtr ()=default
 
HALIDE_ALWAYS_INLINE IntrusivePtr (const IRNode *p)
 
HALIDE_ALWAYS_INLINE IntrusivePtr (const IntrusivePtr< const IRNode > &other) noexcept
 
HALIDE_ALWAYS_INLINE IntrusivePtr (IntrusivePtr< const IRNode > &&other) noexcept
 
IntrusivePtr< const IRNode > & operator= (const IntrusivePtr< const IRNode > &other)
 
IntrusivePtr< const IRNode > & operator= (IntrusivePtr< const IRNode > &&other) noexcept
 
HALIDE_ALWAYS_INLINE bool defined () const
 
HALIDE_ALWAYS_INLINE bool same_as (const IntrusivePtr &other) const
 
HALIDE_ALWAYS_INLINE bool operator< (const IntrusivePtr< const IRNode > &other) const
 

Additional Inherited Members

- Protected Attributes inherited from Halide::Internal::IntrusivePtr< const IRNode >
const IRNodeptr
 

Detailed Description

A fragment of Halide syntax.

It's implemented as reference-counted handle to a concrete expression node, but it's immutable, so you can treat it as a value type.

Examples
tutorial/lesson_01_basics.cpp, tutorial/lesson_02_input_image.cpp, tutorial/lesson_04_debugging_2.cpp, tutorial/lesson_07_multi_stage_pipelines.cpp, tutorial/lesson_09_update_definitions.cpp, tutorial/lesson_13_tuples.cpp, and tutorial/lesson_14_types.cpp.

Definition at line 257 of file Expr.h.

Constructor & Destructor Documentation

◆ Expr() [1/15]

HALIDE_ALWAYS_INLINE Halide::Expr::Expr ( )
default

Make an undefined expression.

◆ Expr() [2/15]

HALIDE_ALWAYS_INLINE Halide::Expr::Expr ( const Internal::BaseExprNode n)
inline

Make an expression from a concrete expression node pointer (e.g.

Add)

Definition at line 264 of file Expr.h.

◆ Expr() [3/15]

Halide::Expr::Expr ( int8_t  x)
inlineexplicit

Make an expression representing numeric constants of various types.

Definition at line 270 of file Expr.h.

References Halide::Internal.

◆ Expr() [4/15]

Halide::Expr::Expr ( int16_t  x)
inlineexplicit

Definition at line 273 of file Expr.h.

References Halide::Internal.

◆ Expr() [5/15]

Halide::Expr::Expr ( int32_t  x)
inline

Definition at line 276 of file Expr.h.

References Halide::Internal.

◆ Expr() [6/15]

Halide::Expr::Expr ( int64_t  x)
inlineexplicit

Definition at line 279 of file Expr.h.

References Halide::Internal.

◆ Expr() [7/15]

Halide::Expr::Expr ( uint8_t  x)
inlineexplicit

Definition at line 282 of file Expr.h.

References Halide::Internal.

◆ Expr() [8/15]

Halide::Expr::Expr ( uint16_t  x)
inlineexplicit

Definition at line 285 of file Expr.h.

References Halide::Internal.

◆ Expr() [9/15]

Halide::Expr::Expr ( uint32_t  x)
inlineexplicit

Definition at line 288 of file Expr.h.

References Halide::Internal.

◆ Expr() [10/15]

Halide::Expr::Expr ( uint64_t  x)
inlineexplicit

Definition at line 291 of file Expr.h.

References Halide::Internal.

◆ Expr() [11/15]

Halide::Expr::Expr ( float16_t  x)
inline

Definition at line 294 of file Expr.h.

References Halide::Internal.

◆ Expr() [12/15]

Halide::Expr::Expr ( bfloat16_t  x)
inline

Definition at line 297 of file Expr.h.

References Halide::Internal.

◆ Expr() [13/15]

Halide::Expr::Expr ( float  x)
inline

Definition at line 300 of file Expr.h.

References Halide::Internal.

◆ Expr() [14/15]

Halide::Expr::Expr ( double  x)
inlineexplicit

Definition at line 303 of file Expr.h.

References Halide::Internal.

◆ Expr() [15/15]

Halide::Expr::Expr ( const std::string &  s)
inline

Make an expression representing a const string (i.e.

a StringImm)

Definition at line 309 of file Expr.h.

References Halide::Internal.

Member Function Documentation

◆ get()

◆ type()


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