MLIR 22.0.0git
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy > Class Template Reference

CRTP base class for Python MLIR affine expressions that subclass AffineExpr and should be castable from it. More...

Inheritance diagram for mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >:

Public Types

using ClassTy = nb::class_<DerivedTy, BaseTy>
using IsAFunctionTy = bool (*)(MlirAffineExpr)

Public Member Functions

 PyConcreteAffineExpr ()=default
 PyConcreteAffineExpr (PyMlirContextRef contextRef, MlirAffineExpr affineExpr)
 PyConcreteAffineExpr (PyAffineExpr &orig)
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr
 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, PyAffineExprmaybeDownCast ()
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject
 BaseContextObject (PyMlirContextRef ref)
PyMlirContextRefgetContext ()
 Accesses the context reference.

Static Public Member Functions

static MlirAffineExpr castFrom (PyAffineExpr &orig)
static void bind (nb::module_ &m)
static void bindDerived (ClassTy &m)
 Implemented by derived classes to add methods to the Python subclass.
Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineExpr
static PyAffineExpr createFromCapsule (const nanobind::object &capsule)
 Creates a PyAffineExpr from the MlirAffineExpr wrapped by a capsule.

Detailed Description

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
class mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >

CRTP base class for Python MLIR affine expressions that subclass AffineExpr and should be castable from it.

Intermediate hierarchy classes can be modeled by specifying BaseTy.

Definition at line 91 of file IRAffine.cpp.

Member Typedef Documentation

◆ ClassTy

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::ClassTy = nb::class_<DerivedTy, BaseTy>

Definition at line 97 of file IRAffine.cpp.

◆ IsAFunctionTy

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::IsAFunctionTy = bool (*)(MlirAffineExpr)

Definition at line 98 of file IRAffine.cpp.

Constructor & Destructor Documentation

◆ PyConcreteAffineExpr() [1/3]

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::PyConcreteAffineExpr ( )
default

Referenced by PyConcreteAffineExpr().

◆ PyConcreteAffineExpr() [2/3]

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::PyConcreteAffineExpr ( PyMlirContextRef contextRef,
MlirAffineExpr affineExpr )
inline

Definition at line 101 of file IRAffine.cpp.

◆ PyConcreteAffineExpr() [3/3]

Member Function Documentation

◆ bind()

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::bind ( nb::module_ & m)
inlinestatic

Definition at line 118 of file IRAffine.cpp.

◆ bindDerived()

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::bindDerived ( ClassTy & m)
inlinestatic

Implemented by derived classes to add methods to the Python subclass.

Definition at line 125 of file IRAffine.cpp.

◆ castFrom()

template<typename DerivedTy, typename BaseTy = PyAffineExpr>
MlirAffineExpr mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAffineExpr< DerivedTy, BaseTy >::castFrom ( PyAffineExpr & orig)
inlinestatic

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