Halide  17.0.2
Halide compiler and libraries
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 (const std::string &s)
 Make an expression representing a const string (i.e. More...
 
HALIDE_ALWAYS_INLINE const 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...
 
 Expr (int8_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (int16_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (int32_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (int64_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (uint8_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (uint16_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (uint32_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (uint64_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (float16_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (bfloat16_t x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (float x)
 Make an expression representing numeric constants of various types. More...
 
 Expr (double x)
 Make an expression representing numeric constants of various types. 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 >
 ~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
 
const IRNodeget () const
 Access the raw pointer in a variety of ways. More...
 
const IRNodeoperator* () const
 Access the raw pointer in a variety of ways. More...
 
const IRNodeoperator-> () const
 Access the raw pointer in a variety of ways. More...
 

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 258 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 265 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 271 of file Expr.h.

◆ Expr() [4/15]

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

Make an expression representing numeric constants of various types.

Definition at line 274 of file Expr.h.

◆ Expr() [5/15]

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

Make an expression representing numeric constants of various types.

Definition at line 277 of file Expr.h.

◆ Expr() [6/15]

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

Make an expression representing numeric constants of various types.

Definition at line 280 of file Expr.h.

◆ Expr() [7/15]

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

Make an expression representing numeric constants of various types.

Definition at line 283 of file Expr.h.

◆ Expr() [8/15]

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

Make an expression representing numeric constants of various types.

Definition at line 286 of file Expr.h.

◆ Expr() [9/15]

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

Make an expression representing numeric constants of various types.

Definition at line 289 of file Expr.h.

◆ Expr() [10/15]

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

Make an expression representing numeric constants of various types.

Definition at line 292 of file Expr.h.

◆ Expr() [11/15]

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

Make an expression representing numeric constants of various types.

Definition at line 295 of file Expr.h.

◆ Expr() [12/15]

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

Make an expression representing numeric constants of various types.

Definition at line 298 of file Expr.h.

◆ Expr() [13/15]

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

Make an expression representing numeric constants of various types.

Definition at line 301 of file Expr.h.

◆ Expr() [14/15]

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

Make an expression representing numeric constants of various types.

Definition at line 304 of file Expr.h.

◆ 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 310 of file Expr.h.

Member Function Documentation

◆ get()

◆ type()


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