-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle conversion to runtime::String for both Arg/Ret value
The `TVMArgValue` and `TVMRetValue` types have different interpretations for the `kTVMStr` and `kTVMBytes`. Therefore, since `pod_value.AsObjectRef<ObjectRef>()` may require converting a `kTVMStr` or `kTVMBytes` into a `tvm::runtime::String`, the `AsObjectRef` method must be implemented in a context that knows which derived POD class is being used. This commit moves the `AsObjectRef` method from `TVMPODValue_` to `TVMPodValue_CRTP_<Derived>`. The POD subclasses now inherit from `TVMPodValue_CRTP_<Derived>`, which itself inherits from `TVMPODValue_`.
- Loading branch information
1 parent
a7eaecf
commit e0f7408
Showing
3 changed files
with
159 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.