13 #include <pybind11/cast.h>
14 #include <pybind11/detail/common.h>
15 #include <pybind11/pybind11.h>
16 #include <pybind11/pytypes.h>
32 anyOpType.def_classmethod(
34 [](py::object cls, MlirContext ctx) {
37 "Get an instance of AnyOpType in the given context.", py::arg(
"cls"),
38 py::arg(
"context") = py::none());
47 anyParamType.def_classmethod(
49 [](py::object cls, MlirContext ctx) {
52 "Get an instance of AnyParamType in the given context.", py::arg(
"cls"),
53 py::arg(
"context") = py::none());
62 anyValueType.def_classmethod(
64 [](py::object cls, MlirContext ctx) {
67 "Get an instance of AnyValueType in the given context.", py::arg(
"cls"),
68 py::arg(
"context") = py::none());
77 operationType.def_classmethod(
79 [](py::object cls,
const std::string &operationName, MlirContext ctx) {
84 "Get an instance of OperationType for the given kind in the given "
86 py::arg(
"cls"), py::arg(
"operation_name"),
87 py::arg(
"context") = py::none());
88 operationType.def_property_readonly(
93 return py::str(operationName.
data, operationName.
length);
95 "Get the name of the payload operation accepted by the handle.");
104 paramType.def_classmethod(
106 [](py::object cls, MlirType type, MlirContext ctx) {
109 "Get an instance of ParamType for the given type in the given context.",
110 py::arg(
"cls"), py::arg(
"type"), py::arg(
"context") = py::none());
111 paramType.def_property_readonly(
117 "Get the type this ParamType is associated with.");
121 m.doc() =
"MLIR Transform dialect.";
Creates a custom subclass of mlir.ir.Type, implementing a casting constructor and type checking metho...
static MlirStringRef mlirStringRefCreate(const char *str, size_t length)
Constructs a string reference from the pointer and length.
Include the generated interface declarations.
A pointer to a sized fragment of a string, not necessarily null-terminated.
const char * data
Pointer to the first symbol.
size_t length
Length of the fragment.