tvm
Public Member Functions | List of all members
tvm::SEqualReducer::Handler Class Referenceabstract

Internal handler that defines custom behaviors.. More...

#include <structural_equal.h>

Collaboration diagram for tvm::SEqualReducer::Handler:

Public Member Functions

virtual bool SEqualReduce (const ObjectRef &lhs, const ObjectRef &rhs, bool map_free_vars)=0
 Reduce condition to equality of lhs and rhs. More...
 
virtual ObjectRef MapLhsToRhs (const ObjectRef &lhs)=0
 Lookup the graph node equal map for vars that are already mapped. More...
 
virtual void MarkGraphNode ()=0
 Mark current comparison as graph node equal comparison. More...
 

Detailed Description

Internal handler that defines custom behaviors..

Member Function Documentation

◆ MapLhsToRhs()

virtual ObjectRef tvm::SEqualReducer::Handler::MapLhsToRhs ( const ObjectRef lhs)
pure virtual

Lookup the graph node equal map for vars that are already mapped.

This is an auxiliary method to check the Map<Var, Value> equality.

Parameters
lhsan lhs value.
Returns
The corresponding rhs value if any, nullptr if not available.

◆ MarkGraphNode()

virtual void tvm::SEqualReducer::Handler::MarkGraphNode ( )
pure virtual

Mark current comparison as graph node equal comparison.

◆ SEqualReduce()

virtual bool tvm::SEqualReducer::Handler::SEqualReduce ( const ObjectRef lhs,
const ObjectRef rhs,
bool  map_free_vars 
)
pure virtual

Reduce condition to equality of lhs and rhs.

Parameters
lhsThe left operand.
rhsThe right operand.
map_free_varsWhether do we allow remap variables if possible.
Returns
false if there is an immediate failure, true otherwise.
Note
This function may save the equality condition of (lhs == rhs) in an internal stack and try to resolve later.

The documentation for this class was generated from the following file: