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

#include "Bindings/Python/IRModule.h"

Inheritance diagram for mlir::python::PyAffineMap:

Public Member Functions

 PyAffineMap (PyMlirContextRef contextRef, MlirAffineMap affineMap)
bool operator== (const PyAffineMap &other) const
 operator MlirAffineMap () const
MlirAffineMap get () const
nanobind::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirAffineMap.
Public Member Functions inherited from mlir::python::BaseContextObject
 BaseContextObject (PyMlirContextRef ref)
PyMlirContextRefgetContext ()
 Accesses the context reference.

Static Public Member Functions

static PyAffineMap createFromCapsule (const nanobind::object &capsule)
 Creates a PyAffineMap from the MlirAffineMap wrapped by a capsule.

Detailed Description

Definition at line 1224 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyAffineMap()

mlir::python::PyAffineMap::PyAffineMap ( PyMlirContextRef contextRef,
MlirAffineMap affineMap )
inline

Definition at line 1226 of file IRModule.h.

References mlir::python::BaseContextObject::BaseContextObject().

Referenced by createFromCapsule(), and operator==().

Member Function Documentation

◆ createFromCapsule()

PyAffineMap PyAffineMap::createFromCapsule ( const nanobind::object & capsule)
static

Creates a PyAffineMap from the MlirAffineMap wrapped by a capsule.

Note that PyAffineMap instances are uniqued, so the returned object may be a pre-existing object. Ownership of the underlying MlirAffineMap is taken by calling this function.

Definition at line 427 of file IRAffine.cpp.

References mlir::python::PyMlirContext::forContext(), mlirAffineMapGetContext(), mlirAffineMapIsNull(), mlirPythonCapsuleToAffineMap(), and PyAffineMap().

◆ get()

MlirAffineMap mlir::python::PyAffineMap::get ( ) const
inline

Definition at line 1230 of file IRModule.h.

◆ getCapsule()

nb::object PyAffineMap::getCapsule ( )

Gets a capsule wrapping the void* within the MlirAffineMap.

Definition at line 423 of file IRAffine.cpp.

References mlirPythonAffineMapToCapsule().

◆ operator MlirAffineMap()

mlir::python::PyAffineMap::operator MlirAffineMap ( ) const
inline

Definition at line 1229 of file IRModule.h.

◆ operator==()

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

Definition at line 419 of file IRAffine.cpp.

References mlirAffineMapEqual(), and PyAffineMap().


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