tqchen commented on code in PR #15872:
URL: https://github.com/apache/tvm/pull/15872#discussion_r1346082809


##########
include/tvm/runtime/data_type.h:
##########
@@ -237,6 +241,49 @@ class DataType {
     }
   }
 
+  /*!
+   * \brief Return the widest type from a given array.
+   *
+   * Given an array of types, return the one of those types that can
+   * hold all values representable in the other types, or "Void" if
+   * such type is not present in the array.
+   */
+  static DataType WidestOf(const std::vector<DataType>& types) {

Review Comment:
   is it possible to use template trick or overloading to handle two/three 
case, mainly avoid the vector passing



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

Reply via email to