Halide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Halide::Expr Struct Reference

A fragment of Halide syntax. More...

#include <Expr.h>

Inherits Halide::Internal::IRHandle.

Public Member Functions

 Expr ()
 Make an undefined expression. More...
 
 Expr (const Internal::BaseExprNode *n)
 Make an expression from a concrete expression node pointer (e.g. More...
 
EXPORT Expr (const std::string &s)
 Make an expression representing a const string (i.e. More...
 
Type type () const
 Get the type of this expression node. More...
 
EXPORT Expr (int8_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (int16_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (int32_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (int64_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (uint8_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (uint16_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (uint32_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (uint64_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (float16_t x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (float x)
 Make an expression representing numeric constants of various types. More...
 
EXPORT Expr (double x)
 Make an expression representing numeric constants of various types. More...
 
- Public Member Functions inherited from Halide::Internal::IRHandle
 IRHandle ()
 
 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...
 
- Public Member Functions inherited from Halide::Internal::IntrusivePtr< const IRNode >
 ~IntrusivePtr ()
 
 IntrusivePtr ()
 
 IntrusivePtr (const IRNode *p)
 
 IntrusivePtr (const IntrusivePtr< const IRNode > &other)
 
 IntrusivePtr (IntrusivePtr< const IRNode > &&other)
 
IntrusivePtr< const IRNode > & operator= (const IntrusivePtr< const IRNode > &other)
 
IntrusivePtr< const IRNode > & operator= (IntrusivePtr< const IRNode > &&other)
 
bool defined () const
 
bool same_as (const IntrusivePtr &other) const
 
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 264 of file Expr.h.

Constructor & Destructor Documentation

Halide::Expr::Expr ( )
inline

Make an undefined expression.

Definition at line 266 of file Expr.h.

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

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

Add)

Definition at line 269 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 274 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 275 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 276 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 277 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 278 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 279 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 280 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 281 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 282 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 283 of file Expr.h.

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

Make an expression representing numeric constants of various types.

Definition at line 284 of file Expr.h.

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

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

a StringImm)

Definition at line 288 of file Expr.h.

Member Function Documentation

Type Halide::Expr::type ( ) const
inline

Get the type of this expression node.

Examples:
tutorial/lesson_14_types.cpp.

Definition at line 291 of file Expr.h.

References Halide::Internal::IntrusivePtr< const IRNode >::ptr.

Referenced by Halide::abs(), Halide::absd(), Halide::acos(), Halide::acosh(), Halide::asin(), Halide::asinh(), Halide::atan(), Halide::atan2(), Halide::atanh(), Halide::cast(), Halide::ceil(), Halide::clamp(), Halide::cos(), Halide::cosh(), Halide::count_leading_zeros(), Halide::count_trailing_zeros(), Halide::div_round_to_zero(), Halide::erf(), Halide::evaluate(), Halide::evaluate_may_gpu(), Halide::exp(), Halide::ConciseCasts::f32(), Halide::ConciseCasts::f64(), Halide::fast_inverse(), Halide::fast_inverse_sqrt(), Halide::floor(), Halide::ConciseCasts::i16(), Halide::ConciseCasts::i16_sat(), Halide::ConciseCasts::i32(), Halide::ConciseCasts::i32_sat(), Halide::ConciseCasts::i64(), Halide::ConciseCasts::i64_sat(), Halide::ConciseCasts::i8(), Halide::ConciseCasts::i8_sat(), Halide::is_nan(), Halide::lerp(), Halide::likely(), Halide::likely_if_innermost(), Halide::log(), Halide::max(), Halide::min(), Halide::mod_round_to_zero(), Halide::operator!=(), Halide::operator%(), Halide::operator&(), Halide::operator&&(), Halide::operator*(), Halide::operator+(), Halide::operator-(), Halide::operator/(), Halide::operator<(), Halide::operator<<(), Halide::operator<=(), Halide::operator==(), Halide::operator>(), Halide::operator>=(), Halide::operator>>(), Halide::operator^(), Halide::operator|(), Halide::operator||(), Halide::operator~(), Halide::popcount(), Halide::pow(), Halide::Internal::Range::Range(), Halide::reinterpret(), Halide::round(), Halide::select(), Halide::Param< T >::set_max_value(), Halide::Param< T >::set_min_value(), Halide::sin(), Halide::sinh(), Halide::sqrt(), Halide::tan(), Halide::tanh(), Halide::trunc(), Halide::ConciseCasts::u16(), Halide::ConciseCasts::u16_sat(), Halide::ConciseCasts::u32(), Halide::ConciseCasts::u32_sat(), Halide::ConciseCasts::u64(), Halide::ConciseCasts::u64_sat(), Halide::ConciseCasts::u8(), and Halide::ConciseCasts::u8_sat().


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