Class FunctionDocObj#

Inheritance Relationships#

Base Type#

Class Documentation#

class FunctionDocObj : public tvm::script::printer::StmtDocObj#

Doc that represents function definition.

See also

FunctionDoc

Public Members

IdDoc name = {ffi::UnsafeInit{}}#

The name of function.

ffi::Array<AssignDoc> args#

The arguments of function.

The lhs means argument name, annotation means argument type, and rhs means default value.

ffi::Array<ExprDoc> decorators#

Decorators of function.

ffi::Optional<ExprDoc> return_type = {std::nullopt}#

The return type of function.

ffi::Array<StmtDoc> body#

The body of function.

ffi::Array<Doc> type_params#

The PEP 695 type parameters of the function.

Possible actual types:

  • ExprDoc (a bare parameter like T)

  • AssignDoc (an annotated parameter like T: int)

Public Static Functions

static inline void RegisterReflection()#
static inline int32_t _GetOrAllocRuntimeTypeIndex()#
static inline int32_t RuntimeTypeIndex() noexcept#