MLIR 23.0.0git
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyTypeID Class Reference

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

#include "mlir/Bindings/Python/IRCore.h"

Public Member Functions

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

Static Public Member Functions

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

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 917 of file IRCore.h.

Constructor & Destructor Documentation

◆ PyTypeID()

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

Definition at line 919 of file IRCore.h.

Member Function Documentation

◆ createFromCapsule()

PyTypeID mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyTypeID::createFromCapsule ( nanobind::object capsule)
static

Creates a PyTypeID from the MlirTypeID wrapped by a capsule.

Definition at line 1957 of file IRCore.cpp.

References mlirPythonTypeIDToCapsule().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().

◆ get()

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

Definition at line 925 of file IRCore.h.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().

◆ getCapsule()

nb::object mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyTypeID::getCapsule ( )

Gets a capsule wrapping the void* within the MlirTypeID.

Definition at line 1953 of file IRCore.cpp.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().

◆ operator MlirTypeID()

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

Definition at line 924 of file IRCore.h.

◆ operator==()

bool mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyTypeID::operator== ( const PyTypeID & other) const

Definition at line 1963 of file IRCore.cpp.


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