MLIR
20.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 |
pybind11::object | getCapsule () |
Gets a capsule wrapping the void* within the MlirAffineExpr. More... | |
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. More... | |
Static Public Member Functions | |
static PyAffineExpr | createFromCapsule (pybind11::object capsule) |
Creates a PyAffineExpr from the MlirAffineExpr wrapped by a capsule. More... | |
Wrapper around MlirAffineExpr. Affine expressions are owned by the context.
Definition at line 1163 of file IRModule.h.
|
inline |
Definition at line 1165 of file IRModule.h.
Referenced by createFromCapsule().
PyAffineExpr mlir::python::PyAffineExpr::add | ( | const PyAffineExpr & | other | ) | const |
PyAffineExpr mlir::python::PyAffineExpr::ceilDiv | ( | const PyAffineExpr & | other | ) | const |
|
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 373 of file IRAffine.cpp.
References mlir::python::PyMlirContext::forContext(), mlirAffineExprGetContext(), mlirAffineExprIsNull(), mlirPythonCapsuleToAffineExpr(), and PyAffineExpr().
PyAffineExpr mlir::python::PyAffineExpr::floorDiv | ( | const PyAffineExpr & | other | ) | const |
|
inline |
Definition at line 1169 of file IRModule.h.
py::object PyAffineExpr::getCapsule | ( | ) |
Gets a capsule wrapping the void* within the MlirAffineExpr.
Definition at line 368 of file IRAffine.cpp.
References mlirPythonAffineExprToCapsule().
PyAffineExpr mlir::python::PyAffineExpr::mod | ( | const PyAffineExpr & | other | ) | const |
PyAffineExpr mlir::python::PyAffineExpr::mul | ( | const PyAffineExpr & | other | ) | const |
|
inline |
Definition at line 1168 of file IRModule.h.
bool PyAffineExpr::operator== | ( | const PyAffineExpr & | other | ) | const |
Definition at line 364 of file IRAffine.cpp.
References mlirAffineExprEqual().