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

A typed staging expression representing a lambda computation. More...

#include <expr.h>

Inheritance diagram for tvm::LambdaExprNode:
Collaboration diagram for tvm::LambdaExprNode:

Public Member Functions

 LambdaExprNode (ffi::UnsafeInit tag)
 
 LambdaExprNode (Expr body)
 
TVM_TIRX_DLL Expr Apply (const ffi::Array< Expr > &arguments) const
 Simultaneously substitute arguments for the bound parameters.
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("ir.LambdaExpr", LambdaExprNode, StagingExprNode)
 
- Public Member Functions inherited from tvm::StagingExprNode
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.StagingExpr", StagingExprNode, ExprNode)
 
- Public Member Functions inherited from tvm::ExprNode
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.Expr", ExprNode, ffi::Object)
 

Static Public Member Functions

static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::StagingExprNode
static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::ExprNode
static void RegisterReflection ()
 

Public Attributes

ffi::Array< Var > vars
 Lambda-local parameter definitions.
 
Expr body
 Computation over the parameters and captured expressions.
 
- Public Attributes inherited from tvm::ExprNode
Location loc = UnknownLoc()
 Location that points to the original source code. Reserved debug information.
 
Type ty = MissingType()
 The deduced or annotated type of the expression.
 

Static Public Attributes

static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
- Static Public Attributes inherited from tvm::StagingExprNode
static constexpr const uint32_t _type_child_slots = 4
 
- Static Public Attributes inherited from tvm::ExprNode
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr const uint32_t _type_child_slots = 64
 

Detailed Description

A typed staging expression representing a lambda computation.

LambdaExpr records computations such as reduction combiners and predication rules. Its body may describe computations on runtime values.

Parameters are bound within the expression body, which may produce a scalar or tuple result. The lambda has a FuncType describing its parameter and return types.

As a StagingExpr, LambdaExpr is eliminated during compilation and does not remain in executable IR.

Constructor & Destructor Documentation

◆ LambdaExprNode() [1/2]

tvm::LambdaExprNode::LambdaExprNode ( ffi::UnsafeInit  tag)
inlineexplicit

◆ LambdaExprNode() [2/2]

tvm::LambdaExprNode::LambdaExprNode ( Expr  body)
inlineexplicit

Member Function Documentation

◆ Apply()

TVM_TIRX_DLL Expr tvm::LambdaExprNode::Apply ( const ffi::Array< Expr > &  arguments) const

Simultaneously substitute arguments for the bound parameters.

◆ RegisterReflection()

static void tvm::LambdaExprNode::RegisterReflection ( )
inlinestatic

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::LambdaExprNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "ir.LambdaExpr"  ,
LambdaExprNode  ,
StagingExprNode   
)

Member Data Documentation

◆ _type_s_eq_hash_kind

constexpr TVMFFISEqHashKind tvm::LambdaExprNode::_type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
staticconstexpr

◆ body

Expr tvm::LambdaExprNode::body

Computation over the parameters and captured expressions.

◆ vars

ffi::Array<Var> tvm::LambdaExprNode::vars

Lambda-local parameter definitions.


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