|
MLIR 22.0.0git
|
Wrapper around MlirAffineExpr. Affine expressions are owned by the context. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| PyAffineExpr (PyMlirContextRef contextRef, MlirAffineExpr affineExpr) | |
| bool | operator== (const PyAffineExpr &other) const |
| operator MlirAffineExpr () const | |
| MlirAffineExpr | get () const |
| nanobind::object | getCapsule () |
| Gets a capsule wrapping the void* within the MlirAffineExpr. | |
| PyAffineExpr | add (const PyAffineExpr &other) const |
| PyAffineExpr | mul (const PyAffineExpr &other) const |
| PyAffineExpr | floorDiv (const PyAffineExpr &other) const |
| PyAffineExpr | ceilDiv (const PyAffineExpr &other) const |
| PyAffineExpr | mod (const PyAffineExpr &other) const |
| nanobind::typed< nanobind::object, PyAffineExpr > | maybeDownCast () |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject | |
| BaseContextObject (PyMlirContextRef ref) | |
| PyMlirContextRef & | getContext () |
| Accesses the context reference. | |
Static Public Member Functions | |
| static PyAffineExpr | createFromCapsule (const nanobind::object &capsule) |
| Creates a PyAffineExpr from the MlirAffineExpr wrapped by a capsule. | |
Wrapper around MlirAffineExpr. Affine expressions are owned by the context.
|
inline |
Definition at line 1205 of file IRCore.h.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject::BaseContextObject().
Referenced by add(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::castFrom(), ceilDiv(), createFromCapsule(), floorDiv(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineBinaryExpr::lhs(), mod(), mul(), operator==(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::PyConcreteAffineExpr(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineBinaryExpr::rhs().
| PyAffineExpr mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr::add | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
| PyAffineExpr mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr::ceilDiv | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
|
static |
Creates a PyAffineExpr from the MlirAffineExpr wrapped by a capsule.
Note that PyAffineExpr instances are uniqued, so the returned object may be a pre-existing object. Ownership of the underlying MlirAffineExpr is taken by calling this function.
Definition at line 369 of file IRAffine.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext::forContext(), mlirAffineExprGetContext(), mlirAffineExprIsNull(), mlirPythonCapsuleToAffineExpr(), and PyAffineExpr().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAffine().
| PyAffineExpr mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr::floorDiv | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
|
inline |
| nb::object PyAffineExpr::getCapsule | ( | ) |
Gets a capsule wrapping the void* within the MlirAffineExpr.
Definition at line 365 of file IRAffine.cpp.
References mlirPythonAffineExprToCapsule().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAffine().
| nb::typed< nb::object, PyAffineExpr > PyAffineExpr::maybeDownCast | ( | ) |
Definition at line 378 of file IRAffine.cpp.
References get(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject::getContext(), mlirAffineExprIsAAdd(), mlirAffineExprIsACeilDiv(), mlirAffineExprIsAConstant(), mlirAffineExprIsADim(), mlirAffineExprIsAFloorDiv(), mlirAffineExprIsAMod(), mlirAffineExprIsAMul(), and mlirAffineExprIsASymbol().
Referenced by mod(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAffine().
| PyAffineExpr mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr::mod | ( | const PyAffineExpr & | other | ) | const |
References maybeDownCast(), and PyAffineExpr().
| PyAffineExpr mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr::mul | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
|
inline |
| bool PyAffineExpr::operator== | ( | const PyAffineExpr & | other | ) | const |
Definition at line 361 of file IRAffine.cpp.
References mlirAffineExprEqual(), and PyAffineExpr().