File pattern_match.h#

↰ Parent directory (tvm/ir)

Shared expression-template pattern and capture protocol.

Definition (tvm/ir/pattern_match.h)#

Detailed Description#

embed:rst:leading-asterisk * .. code-block:: cpp * * #include <tvm/ir/prim/pattern_match.h> * * void MatchMultiplyAdd(const tvm::PrimExpr& expr) { * tvm::PVar<tvm::PrimExpr> a, b, c; * if ((a * b + c).Match(expr)) { * tvm::PrimExpr lhs = a.Eval(); * tvm::PrimExpr rhs = b.Eval(); * tvm::PrimExpr addend = c.Eval(); * } * } *

Includes#

  • optional

  • tuple

  • tvm/ffi/cast.h

  • type_traits

  • utility

Included By#

Namespaces#

Classes#