tvm
Public Member Functions | Static 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

 PrimExpr (Call call)
 Construct from a call after checking that its result type is PrimType. More...
 
 PrimExpr (int32_t value)
 construct from integer. More...
 
 PrimExpr (float value)
 construct from float. More...
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (PrimExpr, TypedExpr< PrimType >, ExprNode)
 
- Public Member Functions inherited from tvm::TypedExpr< PrimType >
PrimType ty () const
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (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
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (Expr, ffi::ObjectRef, ExprNode)
 

Static Public Member Functions

static PrimExpr ConvertFallbackValue (ffi::String value)
 construct from string to form a StringImm. More...
 

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/3]

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/3]

tvm::PrimExpr::PrimExpr ( int32_t  value)

construct from integer.

Parameters
valueThe value to be constructed.

◆ PrimExpr() [3/3]

tvm::PrimExpr::PrimExpr ( float  value)

construct from float.

Parameters
valueThe value to be constructed.

Member Function Documentation

◆ ConvertFallbackValue()

static PrimExpr tvm::PrimExpr::ConvertFallbackValue ( ffi::String  value)
static

construct from string to form a StringImm.

Parameters
valueThe value to be constructed.

◆ TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE()

tvm::PrimExpr::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE ( 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: