Managed reference to FuncStructInfoNode.
More...
#include <struct_info.h>
|
| FuncStructInfo (Array< StructInfo > params, StructInfo ret, bool purity=true, Span span=Span()) |
| Constructor from parameter struct info and return value struct info. More...
|
|
| TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS (FuncStructInfo, StructInfo, FuncStructInfoNode) |
|
| TVM_DEFINE_OBJECT_REF_METHODS (StructInfo, ObjectRef, StructInfoNode) |
|
| ObjectRef ()=default |
| default constructor More...
|
|
| ObjectRef (ObjectPtr< Object > data) |
| Constructor from existing object ptr. More...
|
|
bool | same_as (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator== (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator!= (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator< (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | defined () const |
|
const Object * | get () const |
|
const Object * | operator-> () const |
|
bool | unique () const |
|
int | use_count () const |
|
template<typename ObjectType , typename = std::enable_if_t<std::is_base_of_v<Object, ObjectType>>> |
const ObjectType * | as () const |
| Try to downcast the internal Object to a raw pointer of a corresponding type. More...
|
|
template<typename ObjectRefType , typename = std::enable_if_t<std::is_base_of_v<ObjectRef, ObjectRefType>>> |
Optional< ObjectRefType > | as () const |
| Try to downcast the ObjectRef to a Optional<T> of the requested type. More...
|
|
◆ FuncStructInfo()
Constructor from parameter struct info and return value struct info.
- Parameters
-
params | The struct info of function parameters. |
ret | The return value struct info. |
purity | The purity of the function (true by default). |
span | The span of the AST. |
- Note
- If the ret contains variables(tir::Var and relax::Var), they must be deducible from params. If you are unsure, you can always erase ret to static.
◆ OpaqueFunc() [1/2]
Construct an opaque function using from return struct info.
- Parameters
-
ret | The struct info of the return value. |
purity | The purity of the function (false by default: most external functions are not pure). |
span | The span of the AST. |
- Returns
- The FuncStructInfo for opaque packedfunc.
- Note
- Defaults to an derive func that always return ObjectStructInfo if not specified.
◆ OpaqueFunc() [2/2]
Constructing an opaque function struct info using derive_func.
- Parameters
-
derive_func | Derivation function. |
purity | The purity of the function (false by default: most external functions are not pure). |
span | The span of the AST. |
- Returns
- The FuncStructInfo for opaque packedfunc.
- Note
- Defaults to an derive func that always return ObjectStructInfo if not specified.
◆ TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS()
The documentation for this class was generated from the following file: