You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/21 09:16:55 UTC

[GitHub] [tvm] A1245967 commented on a diff in pull request #10014: Fix function number datatype from char to uint16_t

A1245967 commented on code in PR #10014:
URL: https://github.com/apache/tvm/pull/10014#discussion_r854967850


##########
src/runtime/crt/common/func_registry.c:
##########
@@ -60,14 +60,20 @@ int strcmp_cursor(const char** cursor, const char* name) {
   return return_value;
 }
 
+uint16_t* TVMFuncRegistry_GetNumFuncs(const TVMFuncRegistry* reg) { return (uint16_t*)reg->names; }

Review Comment:
   I think the following line also need to be changed if I choose to return the value instead of the address.
   
   We update the value of `num_funcs` at this [line](https://github.com/A1245967/tvm/blob/ea5968c318a514f86e178266013a1f16062bbc3c/src/runtime/crt/common/func_registry.c#L158) .
   If I choose to return the value in `TVMFuncRegistry_GetNumFuncs`, I should write a function to update `num_funcs` in buffer.
   Do I need to write a function like `TVMFuncRegistry_SetNumFuncs` to set the value of `num_funcs`?



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org