This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch refactor-s0
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit acd5e5ca2686a93195b815ee828ffb9f8392aa18
Author: tqchen <[email protected]>
AuthorDate: Mon Mar 10 10:06:36 2025 -0400

    Fix ffi
---
 ffi/include/tvm/ffi/object.h     | 6 ++----
 ffi/include/tvm/ffi/reflection.h | 5 +++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/ffi/include/tvm/ffi/object.h b/ffi/include/tvm/ffi/object.h
index 8173a362e2..a7afb6c12f 100644
--- a/ffi/include/tvm/ffi/object.h
+++ b/ffi/include/tvm/ffi/object.h
@@ -521,10 +521,8 @@ class ObjectUnsafe {
 
   template <typename Class>
   static TVM_FFI_INLINE int64_t GetObjectOffsetToSubclass() {
-    return (
-      reinterpret_cast<int64_t>(&(static_cast<Class*>(nullptr)->header_)) -
-      reinterpret_cast<int64_t>(&(static_cast<Object*>(nullptr)->header_))
-    );
+    return 
(reinterpret_cast<int64_t>(&(static_cast<Class*>(nullptr)->header_)) -
+            
reinterpret_cast<int64_t>(&(static_cast<Object*>(nullptr)->header_)));
   }
 
   template <typename T>
diff --git a/ffi/include/tvm/ffi/reflection.h b/ffi/include/tvm/ffi/reflection.h
index 6da880ab1f..f3cc580853 100644
--- a/ffi/include/tvm/ffi/reflection.h
+++ b/ffi/include/tvm/ffi/reflection.h
@@ -52,8 +52,9 @@ struct Type2FieldStaticTypeIndex<T, 
std::enable_if_t<TypeTraits<T>::enabled>> {
  * \returns The byteoffset
  */
 template <typename Class, typename T>
-inline int64_t GetFieldByteOffsetToObject(T Class::* field_ptr) {
-  int64_t field_offset_to_class = 
reinterpret_cast<int64_t>(&(static_cast<Class*>(nullptr)->*field_ptr));
+inline int64_t GetFieldByteOffsetToObject(T Class::*field_ptr) {
+  int64_t field_offset_to_class =
+      reinterpret_cast<int64_t>(&(static_cast<Class*>(nullptr)->*field_ptr));
   return field_offset_to_class - 
details::ObjectUnsafe::GetObjectOffsetToSubclass<Class>();
 }
 

Reply via email to