tqchen commented on a change in pull request #5719:
URL: https://github.com/apache/incubator-tvm/pull/5719#discussion_r434314213
##########
File path: include/tvm/node/container.h
##########
@@ -82,6 +82,21 @@ class MapNode : public Object {
/*! \brief the data content */
ContainerType data;
+ /*!
+ * \brief Check if all keys in the MapNode are instance of the given Object
type
+ * \tparam T The given Object type
+ * \return The result of the check
+ */
+ template <class T>
+ bool KeysAreInstance() const {
Review comment:
This is not so commonly used, let us make it an internal helper function
instead, we can also use
https://en.cppreference.com/w/cpp/algorithm/all_any_none_of
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]