tvm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
tvm::PrimExpr Class Reference

Typed reference/view over any Expr whose ExprNode::ty is PrimType. More...

#include <base_expr.h>

Inheritance diagram for tvm::PrimExpr:
Collaboration diagram for tvm::PrimExpr:

Public Member Functions

TVM_TIRX_DLL PrimExpr (Call call)
 Construct from a call after checking that its result type is PrimType.
 
TVM_TIRX_DLL PrimExpr (int32_t value)
 construct from integer.
 
TVM_TIRX_DLL PrimExpr (float value)
 construct from float.
 
 PrimExpr (ffi::ObjectPtr< ExprNode > node)
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (PrimExpr, TypedExpr< PrimType >, ExprNode)
 
- Public Member Functions inherited from tvm::TypedExpr< PrimType >
PrimType ty () const
 
 TypedExpr (ffi::ObjectPtr< ExprNode > node)
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (TypedExpr, Expr, ExprNode)
 
- Public Member Functions inherited from tvm::Expr
bool operator== (const Expr &other) const =delete
 
bool operator!= (const Expr &other) const =delete
 
bool operator< (const Expr &other) const =delete
 
 Expr (ffi::ObjectPtr< ExprNode > node)
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (Expr, ffi::ObjectRef, ExprNode)
 

Static Public Attributes

static constexpr bool _type_container_is_exact = false
 
- Static Public Attributes inherited from tvm::TypedExpr< PrimType >
static constexpr bool _type_container_is_exact
 

Detailed Description

Typed reference/view over any Expr whose ExprNode::ty is PrimType.

PrimExpr is a type category rather than a dedicated runtime node category. It can contain intrinsic primitive nodes such as IntImmNode and FloatImmNode, or a general ExprNode such as CallNode, when that expression's ty field is a PrimType. This keeps primitive-only APIs explicit while allowing shared Expr nodes for cross-dialect values with richer result types when needed.

Constructor & Destructor Documentation

◆ PrimExpr() [1/4]

TVM_TIRX_DLL tvm::PrimExpr::PrimExpr ( Call  call)

Construct from a call after checking that its result type is PrimType.

Parameters
callThe call to view as a primitive expression.

◆ PrimExpr() [2/4]

TVM_TIRX_DLL tvm::PrimExpr::PrimExpr ( int32_t  value)

construct from integer.

Parameters
valueThe value to be constructed.

◆ PrimExpr() [3/4]

TVM_TIRX_DLL tvm::PrimExpr::PrimExpr ( float  value)

construct from float.

Parameters
valueThe value to be constructed.

◆ PrimExpr() [4/4]

tvm::PrimExpr::PrimExpr ( ffi::ObjectPtr< ExprNode >  node)
inlineexplicit

Member Function Documentation

◆ TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE()

tvm::PrimExpr::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE ( PrimExpr  ,
TypedExpr< PrimType >  ,
ExprNode   
)

Member Data Documentation

◆ _type_container_is_exact

constexpr bool tvm::PrimExpr::_type_container_is_exact = false
staticconstexpr

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