tvm
Public Member Functions | Static Public Member Functions | List of all members
tvm::runtime::vm::VMClosure Class Reference

reference to closure. More...

#include <vm.h>

Inheritance diagram for tvm::runtime::vm::VMClosure:
Collaboration diagram for tvm::runtime::vm::VMClosure:

Public Member Functions

 VMClosure (String func_name, ffi::Function impl)
 
 TVM_DEFINE_OBJECT_REF_METHODS (VMClosure, ObjectRef, VMClosureObj)
 

Static Public Member Functions

static ffi::Function BindLastArgs (ffi::Function func, std::vector< ffi::Any > last_args)
 Create another ffi::Function with last arguments already bound to last_args. More...
 

Detailed Description

reference to closure.

Constructor & Destructor Documentation

◆ VMClosure()

tvm::runtime::vm::VMClosure::VMClosure ( String  func_name,
ffi::Function  impl 
)

Member Function Documentation

◆ BindLastArgs()

static ffi::Function tvm::runtime::vm::VMClosure::BindLastArgs ( ffi::Function  func,
std::vector< ffi::Any >  last_args 
)
static

Create another ffi::Function with last arguments already bound to last_args.

This is a helper function to create captured closures.

Parameters
funcThe input func, can be a VMClosure or ffi::Function.
last_argsThe arguments to bound to in the end of the function.
Note
The new function takes in arguments and append the last_args in the end.

◆ TVM_DEFINE_OBJECT_REF_METHODS()

tvm::runtime::vm::VMClosure::TVM_DEFINE_OBJECT_REF_METHODS ( VMClosure  ,
ObjectRef  ,
VMClosureObj   
)

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