tqchen commented on a change in pull request #4765: [tir] make IterVar extends 
Var
URL: https://github.com/apache/incubator-tvm/pull/4765#discussion_r370429075
 
 

 ##########
 File path: include/tvm/tir/expr.h
 ##########
 @@ -236,21 +228,33 @@ enum IterVarType : int {
  * \brief Iteration Variable,
  *  represents an iteration over an integer interval.
  */
-class IterVar : public ObjectRef {
+class IterVar : public Var {
  public:
   // construct a new iter var without a domain
   IterVar() {}
   // construct from shared ptr.
-  explicit IterVar(ObjectPtr<Object> n) : ObjectRef(n) {}
+  explicit IterVar(ObjectPtr<Object> n) : Var(n) {}
+  /*! \brief constructor.
+   * \param dom interval of the variable.
+   * \param iter_type indicate the iteration type of the variable.
+   * \param name_hint variable name
+   * \param t data type
+   * \param thread_tag additional tag on the iteration variable.
+   */
+  TVM_DLL IterVar(Range dom, IterVarType iter_type,
 
 Review comment:
   I feel in this case perhaps it is also worth to consider consistency 
withVar, which means we should put name first. But provide auxilary factory 
functions(e.g. thread_axis) to quickly construct some of the data

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to