tvm
closure.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
24 #ifndef TVM_RUNTIME_CONTAINER_CLOSURE_H_
25 #define TVM_RUNTIME_CONTAINER_CLOSURE_H_
26 
27 #include "./base.h"
28 
29 namespace tvm {
30 namespace runtime {
31 
36 class ClosureObj : public Object {
37  public:
38  static constexpr const uint32_t _type_index = TypeIndex::kRuntimeClosure;
39  static constexpr const char* _type_key = "runtime.Closure";
41 };
42 
44 class Closure : public ObjectRef {
45  public:
47 };
48 
49 } // namespace runtime
50 } // namespace tvm
51 
52 #endif // TVM_RUNTIME_CONTAINER_CLOSURE_H_
An object representing a closure. This object is used by both the Relay VM and interpreter.
Definition: closure.h:36
TVM_DECLARE_BASE_OBJECT_INFO(ClosureObj, Object)
static constexpr const char * _type_key
Definition: closure.h:39
static constexpr const uint32_t _type_index
Definition: closure.h:38
reference to closure.
Definition: closure.h:44
TVM_DEFINE_OBJECT_REF_METHODS(Closure, ObjectRef, ClosureObj)
Base class of all object reference.
Definition: object.h:519
base class of all object containers.
Definition: object.h:171
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
@ kRuntimeClosure
Definition: object.h:80