junrushao commented on code in PR #443:
URL: https://github.com/apache/tvm-ffi/pull/443#discussion_r2805953527


##########
src/ffi/extra/structural_hash.cc:
##########
@@ -185,11 +190,25 @@ class StructuralHashHandler {
   }
 
   // NOLINTNEXTLINE(performance-unnecessary-value-param)
-  uint64_t HashArray(Array<Any> arr) {
-    uint64_t hash_value = details::StableHashCombine(arr->GetTypeKeyHash(), 
arr.size());
-    for (const auto& elem : arr) {
+  uint64_t HashArray(Array<Any> arr) { return HashSequence(std::move(arr)); }
+
+  // NOLINTNEXTLINE(performance-unnecessary-value-param)
+  uint64_t HashList(List<Any> list) { return HashSequence(std::move(list)); }
+
+  template <typename SeqType>
+  // NOLINTNEXTLINE(performance-unnecessary-value-param)
+  uint64_t HashSequence(SeqType seq) {
+    const Object* obj_ptr = seq.get();

Review Comment:
   removed



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