MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
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
 
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)
 
PyMlirContextRefgetContext ()
 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...
 

Detailed Description

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

Definition at line 1163 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyAffineExpr()

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

Definition at line 1165 of file IRModule.h.

Referenced by createFromCapsule().

Member Function Documentation

◆ add()

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

◆ ceilDiv()

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

◆ createFromCapsule()

PyAffineExpr PyAffineExpr::createFromCapsule ( pybind11::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 373 of file IRAffine.cpp.

References mlir::python::PyMlirContext::forContext(), mlirAffineExprGetContext(), mlirAffineExprIsNull(), mlirPythonCapsuleToAffineExpr(), and PyAffineExpr().

◆ floorDiv()

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

◆ get()

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

Definition at line 1169 of file IRModule.h.

◆ getCapsule()

py::object PyAffineExpr::getCapsule ( )

Gets a capsule wrapping the void* within the MlirAffineExpr.

Definition at line 368 of file IRAffine.cpp.

References mlirPythonAffineExprToCapsule().

◆ mod()

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

◆ mul()

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

◆ operator MlirAffineExpr()

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

Definition at line 1168 of file IRModule.h.

◆ operator==()

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

Definition at line 364 of file IRAffine.cpp.

References mlirAffineExprEqual().


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