jroesch commented on a change in pull request #8725:
URL: https://github.com/apache/tvm/pull/8725#discussion_r693245702
##########
File path: rust/tvm-rt/src/ndarray.rs
##########
@@ -101,6 +101,21 @@ impl NDArrayContainer {
.cast::<NDArrayContainer>()
}
}
+
+ pub fn as_mut_ptr<'a>(object_ptr: &ObjectPtr<NDArrayContainer>) -> *mut
NDArrayContainer
Review comment:
@robo-corg I think this is modeled after the other `leak` family of
functions in Rust which take ownership
https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak.
I admit this code is very tricky and scary it might be worth opening up
follow up issue.
--
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]