DKXXXL commented on issue #4468: [RFC] Data-flow Analysis Functionality on TVM 
IR
URL: https://github.com/apache/incubator-tvm/issues/4468#issuecomment-561917833
 
 
   ### Comments:  IsLattice
   The basic usage is just:
   ```cpp
   template <typename T>
   struct STD_SET_IS_LATTICE : public IsLattice<std::set<T>> {
     using SET = std::set<T>;
     public:
        SET join(const SET& a, const SET& b);
        SET meet(const SET& a, const SET& b);
        const SET& top();
        const SET& bottom();
        bool equal(const SET& a, const SET& b);
        static const STD_SET_IS_LATTICE<T>& __ops() {
          static const STD_SET_IS_LATTICE<T> op;
          return op;
        }
        static const STD_SET_IS_LATTICE<T>& ops = 
STD_SET_IS_LATTICE<T>::__ops();    
   };
   ```
   and when trying to make things concrete, you can try to declare something 
like `class X : ffdfa<std::set, STD_SET_IS_LATTICE , STD_SET_IS_LATTICE::ops>` 
. 

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