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

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

#include <expr.h>

Inheritance diagram for tvm::LambdaExprObj:
Collaboration diagram for tvm::LambdaExprObj:

Public Member Functions

 LambdaExprObj (ffi::UnsafeInit tag)
 
 LambdaExprObj (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", LambdaExprObj, StagingExprObj)
 
- Public Member Functions inherited from tvm::StagingExprObj
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.StagingExpr", StagingExprObj, ExprObj)
 
- Public Member Functions inherited from tvm::ExprObj
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.Expr", ExprObj, ffi::Object)
 

Static Public Member Functions

static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::StagingExprObj
static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::ExprObj
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::ExprObj
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::StagingExprObj
static constexpr const uint32_t _type_child_slots = 4
 
- Static Public Attributes inherited from tvm::ExprObj
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

◆ LambdaExprObj() [1/2]

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

◆ LambdaExprObj() [2/2]

tvm::LambdaExprObj::LambdaExprObj ( Expr  body)
inlineexplicit

Member Function Documentation

◆ Apply()

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

Simultaneously substitute arguments for the bound parameters.

◆ RegisterReflection()

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

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::LambdaExprObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "ir.LambdaExpr"  ,
LambdaExprObj  ,
StagingExprObj   
)

Member Data Documentation

◆ _type_s_eq_hash_kind

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

◆ body

Expr tvm::LambdaExprObj::body

Computation over the parameters and captured expressions.

◆ vars

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

Lambda-local parameter definitions.


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