MLIR 22.0.0git
mlir::python::PyAffineExpr Class Reference

Wrapper around MlirAffineExpr. Affine expressions are owned by the context. More...

#include "Bindings/Python/IRModule.h"

Inheritance diagram for mlir::python::PyAffineExpr:

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)
PyMlirContextRefgetContext ()
 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.

Detailed Description

Wrapper around MlirAffineExpr. Affine expressions are owned by the context.

Definition at line 1197 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyAffineExpr()

mlir::python::PyAffineExpr::PyAffineExpr ( PyMlirContextRef contextRef,
MlirAffineExpr affineExpr )
inline

Member Function Documentation

◆ add()

PyAffineExpr mlir::python::PyAffineExpr::add ( const PyAffineExpr & other) const

References PyAffineExpr().

◆ ceilDiv()

PyAffineExpr mlir::python::PyAffineExpr::ceilDiv ( const PyAffineExpr & other) const

References PyAffineExpr().

◆ createFromCapsule()

PyAffineExpr PyAffineExpr::createFromCapsule ( const nanobind::object & capsule)
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().

◆ floorDiv()

PyAffineExpr mlir::python::PyAffineExpr::floorDiv ( const PyAffineExpr & other) const

References PyAffineExpr().

◆ get()

MlirAffineExpr mlir::python::PyAffineExpr::get ( ) const
inline

Definition at line 1203 of file IRModule.h.

◆ getCapsule()

nb::object PyAffineExpr::getCapsule ( )

Gets a capsule wrapping the void* within the MlirAffineExpr.

Definition at line 365 of file IRAffine.cpp.

References mlirPythonAffineExprToCapsule().

◆ mod()

PyAffineExpr mlir::python::PyAffineExpr::mod ( const PyAffineExpr & other) const

References PyAffineExpr().

◆ mul()

PyAffineExpr mlir::python::PyAffineExpr::mul ( const PyAffineExpr & other) const

References PyAffineExpr().

◆ operator MlirAffineExpr()

mlir::python::PyAffineExpr::operator MlirAffineExpr ( ) const
inline

Definition at line 1202 of file IRModule.h.

◆ operator==()

bool PyAffineExpr::operator== ( const PyAffineExpr & other) const

Definition at line 361 of file IRAffine.cpp.

References mlirAffineExprEqual(), and PyAffineExpr().


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