junrushao1994 commented on a change in pull request #10031:
URL: https://github.com/apache/tvm/pull/10031#discussion_r790196939
##########
File path: include/tvm/runtime/packed_func.h
##########
@@ -1148,9 +1192,19 @@ inline TVMArgValue TVMArgs::operator[](int i) const {
inline int TVMArgs::size() const { return num_args; }
-inline void PackedFunc::CallPacked(TVMArgs args, TVMRetValue* rv) const {
body_(args, rv); }
+template <class TPackedFuncSubObj>
+void PackedFuncObj::Extractor<TPackedFuncSubObj>::Call(const PackedFuncObj*
obj, TVMArgs args, TVMRetValue* rv) {
+ (static_cast<const TPackedFuncSubObj*>(obj))->callable_(args, rv);
+}
+
+inline void PackedFuncObj::CallPacked(TVMArgs args, TVMRetValue* rv) const {
+ (*f_call_)(this, args, rv);
+}
+
-inline PackedFunc::FType PackedFunc::body() const { return body_; }
+inline void PackedFunc::CallPacked(TVMArgs args, TVMRetValue* rv) const {
Review comment:
nit:
```suggestion
inline TVM_ALWAYS_INLINE void PackedFunc::CallPacked(TVMArgs args,
TVMRetValue* rv) const {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]