MLIR  20.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 ()
 
nanobind::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirTypeID. More...
 

Static Public Member Functions

static PyTypeID createFromCapsule (nanobind::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 901 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyTypeID()

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

Definition at line 903 of file IRModule.h.

Referenced by createFromCapsule().

Member Function Documentation

◆ createFromCapsule()

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

Creates a PyTypeID from the MlirTypeID wrapped by a capsule.

Definition at line 2005 of file IRCore.cpp.

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

◆ get()

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

Definition at line 909 of file IRModule.h.

◆ getCapsule()

nb::object PyTypeID::getCapsule ( )

Gets a capsule wrapping the void* within the MlirTypeID.

Definition at line 2001 of file IRCore.cpp.

References mlirPythonTypeIDToCapsule().

◆ operator MlirTypeID()

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

Definition at line 908 of file IRModule.h.

◆ operator==()

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

Definition at line 2011 of file IRCore.cpp.

References mlirTypeIDEqual().


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