tlopex opened a new pull request, #734:
URL: https://github.com/apache/tvm-ffi/pull/734

   This PR adds ObjectRefCore::as_node<N>() for zero-copy borrowed object-node 
casts.
   
   Checks such as is_zero currently clone an owning object handle before 
calling try_cast. This performs an atomic reference-count increment and 
decrement even though the caller only needs to inspect the node temporarily.
   
   The new API checks the runtime type directly from the existing object header 
and returns a reference tied to the source handle. It does not clone the 
handle, construct an owning cast result, or update the reference count. Final 
node types, such as IntImmObj, use a fast exact type-index comparison.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to