You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/05/06 22:24:44 UTC

[GitHub] [incubator-tvm] kparzysz-quic commented on a change in pull request #5533: Cache ObjectPtr instead of raw pointers in bound analyzer

kparzysz-quic commented on a change in pull request #5533:
URL: https://github.com/apache/incubator-tvm/pull/5533#discussion_r421127447



##########
File path: include/tvm/arith/analyzer.h
##########
@@ -107,6 +107,7 @@ class ConstIntBound : public ObjectRef {
  */
 class ConstIntBoundAnalyzer {
  public:
+  using BoundMapType = std::unordered_map<ObjectPtr<const PrimExprNode>, ConstIntBound, ObjectHash>;

Review comment:
       So, no const?  Then `GetObjectPtr` will need a `const_cast`, e.g.
   ```
   auto op = GetElementPtr(const_cast<PrimExprNode*>(expr.as<PrimExprNode>()));
   ```
   
   Do you also want to remove the first commit?




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