! \brief ObjectRef hash functor */
| 895 | |
| 896 | /*! \brief ObjectRef hash functor */ |
| 897 | struct ObjectPtrHash { |
| 898 | size_t operator()(const ObjectRef& a) const { return operator()(a.data_); } |
| 899 | |
| 900 | template <typename T> |
| 901 | size_t operator()(const ObjectPtr<T>& a) const { |
| 902 | return std::hash<Object*>()(a.get()); |
| 903 | } |
| 904 | |
| 905 | template <typename... V> |
| 906 | TVM_FFI_INLINE size_t operator()(const Variant<V...>& a) const; |
| 907 | }; |
| 908 | |
| 909 | /*! \brief ObjectRef equal functor */ |
| 910 | struct ObjectPtrEqual { |