tqchen commented on code in PR #58:
URL: https://github.com/apache/tvm-ffi/pull/58#discussion_r2380562714
##########
include/tvm/ffi/c_api.h:
##########
@@ -220,19 +220,30 @@ typedef enum {
* \note TVMFFIObject and TVMFFIAny share the common type_index header
*/
typedef struct {
+ // Ref counter goes first to align ABI with most intrusive ptr designs.
+ // It is also likely more efficient as rc operations can be quite common
+ // ABI note: Strong ref counter and weak ref counter can be packed into a
single 64-bit field
+ // Hopefully in future being able to use 64bit atomic that avoids extra
reading of
+ // weak counter during deletion.
Review Comment:
latest update resolves the 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]