|
MLIR 22.0.0git
|
Wrapper around MlirAffineExpr. Affine expressions are owned by the context. More...
#include "Bindings/Python/IRModule.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 |
| Public Member Functions inherited from mlir::python::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.
Definition at line 1197 of file IRModule.h.
|
inline |
Definition at line 1199 of file IRModule.h.
References mlir::python::BaseContextObject::BaseContextObject().
Referenced by add(), ceilDiv(), createFromCapsule(), floorDiv(), mod(), mul(), and operator==().
| PyAffineExpr mlir::python::PyAffineExpr::add | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
| PyAffineExpr mlir::python::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::PyMlirContext::forContext(), mlirAffineExprGetContext(), mlirAffineExprIsNull(), mlirPythonCapsuleToAffineExpr(), and PyAffineExpr().
| PyAffineExpr mlir::python::PyAffineExpr::floorDiv | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
|
inline |
Definition at line 1203 of file IRModule.h.
| nb::object PyAffineExpr::getCapsule | ( | ) |
Gets a capsule wrapping the void* within the MlirAffineExpr.
Definition at line 365 of file IRAffine.cpp.
References mlirPythonAffineExprToCapsule().
| PyAffineExpr mlir::python::PyAffineExpr::mod | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
| PyAffineExpr mlir::python::PyAffineExpr::mul | ( | const PyAffineExpr & | other | ) | const |
References PyAffineExpr().
|
inline |
Definition at line 1202 of file IRModule.h.
| bool PyAffineExpr::operator== | ( | const PyAffineExpr & | other | ) | const |
Definition at line 361 of file IRAffine.cpp.
References mlirAffineExprEqual(), and PyAffineExpr().