13 #include "mlir/Bindings/Python/PybindAdaptors.h"
15 #include <pybind11/pybind11.h>
16 #include <pybind11/pytypes.h>
17 #include <pybind11/stl.h>
20 using namespace circt;
21 using namespace mlir::python::adaptors;
25 m.doc() =
"RTG dialect Python native extension";
30 [](py::object cls, MlirContext
ctxt) {
33 py::arg(
"self"), py::arg(
"ctxt") =
nullptr);
38 [](py::object cls, MlirContext
ctxt) {
41 py::arg(
"self"), py::arg(
"ctxt") =
nullptr);
49 py::arg(
"self"), py::arg(
"element_type"));
57 py::arg(
"self"), py::arg(
"element_type"));
62 [](py::object cls, MlirContext
ctxt,
63 const std::vector<std::pair<MlirAttribute, MlirType>> &entries) {
64 std::vector<MlirAttribute> names;
65 std::vector<MlirType> types;
66 for (
auto entry : entries) {
67 names.push_back(entry.first);
68 types.push_back(entry.second);
73 py::arg(
"self"), py::arg(
"ctxt") =
nullptr,
75 std::vector<std::pair<MlirAttribute, MlirType>>());
MLIR_CAPI_EXPORTED MlirType rtgLabelTypeGet(MlirContext ctxt)
Creates an RTG mode type in the context.
MLIR_CAPI_EXPORTED bool rtgTypeIsABag(MlirType type)
If the type is an RTG bag.
MLIR_CAPI_EXPORTED MlirType rtgSetTypeGet(MlirType elementType)
Creates an RTG set type in the context.
MLIR_CAPI_EXPORTED bool rtgTypeIsASet(MlirType type)
If the type is an RTG set.
MLIR_CAPI_EXPORTED bool rtgTypeIsADict(MlirType type)
If the type is an RTG dict.
MLIR_CAPI_EXPORTED MlirType rtgSequenceTypeGet(MlirContext ctxt)
Creates an RTG sequence type in the context.
MLIR_CAPI_EXPORTED MlirType rtgDictTypeGet(MlirContext ctxt, intptr_t numEntries, MlirAttribute const *entryNames, MlirType const *entryTypes)
Creates an RTG dict type in the context.
MLIR_CAPI_EXPORTED MlirType rtgBagTypeGet(MlirType elementType)
Creates an RTG bag type in the context.
MLIR_CAPI_EXPORTED bool rtgTypeIsASequence(MlirType type)
If the type is an RTG sequence.
MLIR_CAPI_EXPORTED bool rtgTypeIsALabel(MlirType type)
If the type is an RTG label.
void populateDialectRTGSubmodule(pybind11::module &m)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.