tvm
Public Member Functions | List of all members
tvm::relax::Tuple Class Reference

#include <expr.h>

Inheritance diagram for tvm::relax::Tuple:
Collaboration diagram for tvm::relax::Tuple:

Public Member Functions

 Tuple (tvm::ffi::Array< Expr > fields, Span span=Span())
 The constructor. More...
 
template<typename ExprType , typename = std::enable_if_t<std::is_base_of_v<Expr, ExprType>>>
 Tuple (tvm::ffi::Array< ExprType > fields, Span span=Span())
 Utility constructor to handle conversion to relax::Expr. More...
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (Tuple, Expr, TupleNode)
 
 TVM_DEFINE_OBJECT_REF_COW_METHOD (TupleNode)
 
- 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)
 

Constructor & Destructor Documentation

◆ Tuple() [1/2]

tvm::relax::Tuple::Tuple ( tvm::ffi::Array< Expr fields,
Span  span = Span() 
)
explicit

The constructor.

Parameters
fieldsThe fields of a tuple.
spanThe source span of the expression.

◆ Tuple() [2/2]

template<typename ExprType , typename = std::enable_if_t<std::is_base_of_v<Expr, ExprType>>>
tvm::relax::Tuple::Tuple ( tvm::ffi::Array< ExprType >  fields,
Span  span = Span() 
)
inlineexplicit

Utility constructor to handle conversion to relax::Expr.

If the calling scope already has an array of a specific type of relax expression (e.g. ffi::Array<relax::Var>), it must be converted into an array of base type. This constructor handles the conversion to the base ffi::Array<relax::Expr>.

Template Parameters
ExprTypeThe type of relax expression passed in as an argument.
Parameters
fieldsThe fields of a tuple.
spanThe source span of the expression.

Member Function Documentation

◆ TVM_DEFINE_OBJECT_REF_COW_METHOD()

tvm::relax::Tuple::TVM_DEFINE_OBJECT_REF_COW_METHOD ( TupleNode  )

◆ TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE()

tvm::relax::Tuple::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE ( Tuple  ,
Expr  ,
TupleNode   
)

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