MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::python::PyTypeID Class Reference

A TypeID provides an efficient and unique identifier for a specific C++ type. More...

#include "Bindings/Python/IRModule.h"

Public Member Functions

 PyTypeID (MlirTypeID typeID)
 
bool operator== (const PyTypeID &other) const
 
 operator MlirTypeID () const
 
MlirTypeID get ()
 
pybind11::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirTypeID. More...
 

Static Public Member Functions

static PyTypeID createFromCapsule (pybind11::object capsule)
 Creates a PyTypeID from the MlirTypeID wrapped by a capsule. More...
 

Detailed Description

A TypeID provides an efficient and unique identifier for a specific C++ type.

This allows for a C++ type to be compared, hashed, and stored in an opaque context. This class wraps around the generic MlirTypeID.

Definition at line 904 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyTypeID()

mlir::python::PyTypeID::PyTypeID ( MlirTypeID  typeID)
inline

Definition at line 906 of file IRModule.h.

Referenced by createFromCapsule().

Member Function Documentation

◆ createFromCapsule()

PyTypeID PyTypeID::createFromCapsule ( pybind11::object  capsule)
static

Creates a PyTypeID from the MlirTypeID wrapped by a capsule.

Definition at line 1981 of file IRCore.cpp.

References mlirPythonCapsuleToTypeID(), mlirTypeIDIsNull(), and PyTypeID().

◆ get()

MlirTypeID mlir::python::PyTypeID::get ( )
inline

Definition at line 912 of file IRModule.h.

◆ getCapsule()

py::object PyTypeID::getCapsule ( )

Gets a capsule wrapping the void* within the MlirTypeID.

Definition at line 1977 of file IRCore.cpp.

References mlirPythonTypeIDToCapsule().

◆ operator MlirTypeID()

mlir::python::PyTypeID::operator MlirTypeID ( ) const
inline

Definition at line 911 of file IRModule.h.

◆ operator==()

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

Definition at line 1987 of file IRCore.cpp.

References mlirTypeIDEqual().


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