|
MLIR 24.0.0git
|
Go to the source code of this file.
Classes | |
| struct | MlirConditionallySpeculatableOpInterfaceCallbacks |
| Callbacks for implementing ConditionallySpeculatable from external code. More... | |
| struct | MlirMemoryEffectsOpInterfaceCallbacks |
| Callbacks for implementing MemoryEffectsOpInterface from external code. More... | |
Macros | |
| #define | DEFINE_C_API_STRUCT(name, storage) |
Typedefs | |
| typedef void(* | MlirTypesCallback) (intptr_t, MlirType *, void *) |
| These callbacks are used to return multiple types from functions while transferring ownership to the caller. | |
| typedef void(* | MlirShapedTypeComponentsCallback) (bool, intptr_t, const int64_t *, MlirType, MlirAttribute, void *) |
| These callbacks are used to return multiple shaped type components from functions while transferring ownership to the caller. | |
| typedef void(* | MlirMemoryEffectInstancesCallback) (intptr_t numEffects, MlirMemoryEffectInstance *effects, void *userData) |
| Callback for receiving a batch of memory effect instances. | |
Enumerations | |
| enum | MlirSpeculatability { MlirSpeculatabilityNotSpeculatable , MlirSpeculatabilitySpeculatable , MlirSpeculatabilityRecursivelySpeculatable } |
| Enum representing the speculatability of an operation. More... | |
Functions | |
| DEFINE_C_API_STRUCT (MlirMemoryEffect, void) | |
| DEFINE_C_API_STRUCT (MlirMemoryEffectInstance, void) | |
| DEFINE_C_API_STRUCT (MlirSideEffectResource, void) | |
| MLIR_CAPI_EXPORTED bool | mlirOperationImplementsInterface (MlirOperation operation, MlirTypeID interfaceTypeID) |
| Returns true if the given operation implements an interface identified by its TypeID. | |
| MLIR_CAPI_EXPORTED bool | mlirOperationImplementsInterfaceStatic (MlirStringRef operationName, MlirContext context, MlirTypeID interfaceTypeID) |
| Returns true if the operation identified by its canonical string name implements the interface identified by its TypeID in the given context. | |
| MLIR_CAPI_EXPORTED MlirTypeID | mlirInferTypeOpInterfaceTypeID (void) |
| Returns the interface TypeID of the InferTypeOpInterface. | |
| MLIR_CAPI_EXPORTED MlirLogicalResult | mlirInferTypeOpInterfaceInferReturnTypes (MlirStringRef opName, MlirContext context, MlirLocation location, intptr_t nOperands, MlirValue *operands, MlirAttribute attributes, void *properties, intptr_t nRegions, MlirRegion *regions, MlirTypesCallback callback, void *userData) |
| Infers the return types of the operation identified by its canonical given the arguments that will be supplied to its generic builder. | |
| MLIR_CAPI_EXPORTED MlirTypeID | mlirInferShapedTypeOpInterfaceTypeID (void) |
| Returns the interface TypeID of the InferShapedTypeOpInterface. | |
| MLIR_CAPI_EXPORTED MlirLogicalResult | mlirInferShapedTypeOpInterfaceInferReturnTypes (MlirStringRef opName, MlirContext context, MlirLocation location, intptr_t nOperands, MlirValue *operands, MlirAttribute attributes, void *properties, intptr_t nRegions, MlirRegion *regions, MlirShapedTypeComponentsCallback callback, void *userData) |
| Infers the return shaped type components of the operation. | |
| MLIR_CAPI_EXPORTED MlirTypeID | mlirConditionallySpeculatableOpInterfaceTypeID (void) |
| Returns the interface TypeID of the ConditionallySpeculatable interface. | |
| MLIR_CAPI_EXPORTED void | mlirConditionallySpeculatableOpInterfaceAttachFallbackModel (MlirContext ctx, MlirStringRef opName, MlirConditionallySpeculatableOpInterfaceCallbacks callbacks) |
| Attach a new FallbackModel for the ConditionallySpeculatable interface to the named operation. | |
| MLIR_CAPI_EXPORTED MlirSpeculatability | mlirConditionallySpeculatableOpInterfaceGetSpeculatability (MlirOperation operation) |
| Returns the speculatability of the given operation. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffect | mlirMemoryEffectsAllocateGet (void) |
| Returns the singleton instance of the allocate memory effect. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffect | mlirMemoryEffectsFreeGet (void) |
| Returns the singleton instance of the free memory effect. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffect | mlirMemoryEffectsReadGet (void) |
| Returns the singleton instance of the read memory effect. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffect | mlirMemoryEffectsWriteGet (void) |
| Returns the singleton instance of the write memory effect. | |
| MLIR_CAPI_EXPORTED MlirTypeID | mlirMemoryEffectGetEffectID (MlirMemoryEffect effect) |
| Returns the TypeID identifying the concrete type of the given memory effect. | |
| MLIR_CAPI_EXPORTED MlirSideEffectResource | mlirSideEffectsDefaultResourceGet (void) |
| Returns the singleton instance of the default side effect resource. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance | mlirMemoryEffectInstanceCreate (MlirMemoryEffect effect, MlirAttribute parameters, int stage, bool effectOnFullRegion, MlirSideEffectResource resource) |
| Creates a memory effect instance without an associated IR entity. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance | mlirMemoryEffectInstanceCreateForOpOperand (MlirMemoryEffect effect, MlirOpOperand opOperand, MlirAttribute parameters, int stage, bool effectOnFullRegion, MlirSideEffectResource resource) |
| Creates a memory effect instance associated with an operation operand. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance | mlirMemoryEffectInstanceCreateForOpResult (MlirMemoryEffect effect, MlirValue result, MlirAttribute parameters, int stage, bool effectOnFullRegion, MlirSideEffectResource resource) |
| Creates a memory effect instance associated with an operation result. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance | mlirMemoryEffectInstanceCreateForBlockArgument (MlirMemoryEffect effect, MlirValue blockArgument, MlirAttribute parameters, int stage, bool effectOnFullRegion, MlirSideEffectResource resource) |
| Creates a memory effect instance associated with a block argument. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance | mlirMemoryEffectInstanceCreateForSymbol (MlirMemoryEffect effect, MlirAttribute symbol, MlirAttribute parameters, int stage, bool effectOnFullRegion, MlirSideEffectResource resource) |
| Creates a memory effect instance associated with a symbol. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance | mlirMemoryEffectInstanceClone (MlirMemoryEffectInstance instance) |
| Creates a copy of a memory effect instance. | |
| MLIR_CAPI_EXPORTED void | mlirMemoryEffectInstanceDestroy (MlirMemoryEffectInstance instance) |
| Destroys a memory effect instance created or cloned by APIs above. | |
| MLIR_CAPI_EXPORTED MlirMemoryEffect | mlirMemoryEffectInstanceGetEffect (MlirMemoryEffectInstance instance) |
| Returns the memory effect of the given instance. | |
| MLIR_CAPI_EXPORTED MlirSideEffectResource | mlirMemoryEffectInstanceGetResource (MlirMemoryEffectInstance instance) |
| Returns the side effect resource of the given instance. | |
| MLIR_CAPI_EXPORTED int | mlirMemoryEffectInstanceGetStage (MlirMemoryEffectInstance instance) |
| Returns the stage of the given instance. | |
| MLIR_CAPI_EXPORTED bool | mlirMemoryEffectInstanceGetEffectOnFullRegion (MlirMemoryEffectInstance instance) |
| Returns true if the given instance has effect on every single value of the resource. | |
| MLIR_CAPI_EXPORTED MlirAttribute | mlirMemoryEffectInstanceGetParameters (MlirMemoryEffectInstance instance) |
| Returns the parameters of the given instance, or a null attribute if there are no parameters. | |
| MLIR_CAPI_EXPORTED MlirValue | mlirMemoryEffectInstanceGetValue (MlirMemoryEffectInstance instance) |
| Returns the value (OpOperand, OpResult, or BlockArgument) of the given instance, or a null value if there is no associated value. | |
| MLIR_CAPI_EXPORTED MlirAttribute | mlirMemoryEffectInstanceGetSymbolRef (MlirMemoryEffectInstance instance) |
| Returns the symbol reference of the given instance, or a null attribute if there is no associated symbol. | |
| MLIR_CAPI_EXPORTED MlirTypeID | mlirMemoryEffectsOpInterfaceTypeID (void) |
| Returns the interface TypeID of the MemoryEffectsOpInterface. | |
| MLIR_CAPI_EXPORTED void | mlirMemoryEffectsOpInterfaceAttachFallbackModel (MlirContext ctx, MlirStringRef opName, MlirMemoryEffectsOpInterfaceCallbacks callbacks) |
| Attach a new FallbackModel for the MemoryEffectsOpInterface to the named operation. | |
| MLIR_CAPI_EXPORTED void | mlirMemoryEffectsOpInterfaceGetEffects (MlirOperation operation, MlirMemoryEffectInstancesCallback callback, void *userData) |
| Gets the memory effects of the given operation. | |
| #define DEFINE_C_API_STRUCT | ( | name, | |
| storage ) |
Definition at line 25 of file Interfaces.h.
| typedef void(* MlirMemoryEffectInstancesCallback) (intptr_t numEffects, MlirMemoryEffectInstance *effects, void *userData) |
Callback for receiving a batch of memory effect instances.
effects points to numEffects consecutive instances. Ownership is not transferred, and the instances are valid only while callback is executing. The caller-provided userData is forwarded to the callback.
Definition at line 262 of file Interfaces.h.
| typedef void(* MlirShapedTypeComponentsCallback) (bool, intptr_t, const int64_t *, MlirType, MlirAttribute, void *) |
These callbacks are used to return multiple shaped type components from functions while transferring ownership to the caller.
The first argument is the has rank boolean followed by the the rank and a pointer to the shape (if applicable). The next argument is the element type, then the attribute. The last argument is an opaque pointer forwarded to the callback by the caller. This callback will be called potentially multiple times for each shaped type components.
Definition at line 89 of file Interfaces.h.
These callbacks are used to return multiple types from functions while transferring ownership to the caller.
The first argument is the number of consecutive elements pointed to by the second argument. The third argument is an opaque pointer forwarded to the callback by the caller.
Definition at line 63 of file Interfaces.h.
| enum MlirSpeculatability |
Enum representing the speculatability of an operation.
Definition at line 107 of file Interfaces.h.
| DEFINE_C_API_STRUCT | ( | MlirMemoryEffect | , |
| void | ) |
| DEFINE_C_API_STRUCT | ( | MlirMemoryEffectInstance | , |
| void | ) |
| DEFINE_C_API_STRUCT | ( | MlirSideEffectResource | , |
| void | ) |
References MLIR_CAPI_EXPORTED.
| MLIR_CAPI_EXPORTED void mlirConditionallySpeculatableOpInterfaceAttachFallbackModel | ( | MlirContext | ctx, |
| MlirStringRef | opName, | ||
| MlirConditionallySpeculatableOpInterfaceCallbacks | callbacks ) |
Attach a new FallbackModel for the ConditionallySpeculatable interface to the named operation.
The FallbackModel will call the provided callbacks.
Attach a new FallbackModel for the ConditionallySpeculatable interface to the named operation.
The FallbackModel uses the provided callbacks to implement the interface.
Definition at line 243 of file Interfaces.cpp.
References mlir::RegisteredOperationName::lookup(), ConditionallySpeculatableOpInterfaceFallbackModel::setCallbacks(), and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConditionallySpeculatableOpInterface::attach().
| MLIR_CAPI_EXPORTED MlirSpeculatability mlirConditionallySpeculatableOpInterfaceGetSpeculatability | ( | MlirOperation | operation | ) |
Returns the speculatability of the given operation.
The operation must implement the ConditionallySpeculatable interface.
Definition at line 264 of file Interfaces.cpp.
References MlirSpeculatabilityNotSpeculatable, MlirSpeculatabilityRecursivelySpeculatable, MlirSpeculatabilitySpeculatable, mlir::Speculation::NotSpeculatable, mlir::Speculation::RecursivelySpeculatable, mlir::Speculation::Speculatable, and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConditionallySpeculatableOpInterface::bindDerived().
| MLIR_CAPI_EXPORTED MlirTypeID mlirConditionallySpeculatableOpInterfaceTypeID | ( | void | ) |
Returns the interface TypeID of the ConditionallySpeculatable interface.
Definition at line 187 of file Interfaces.cpp.
References wrap().
| MLIR_CAPI_EXPORTED MlirLogicalResult mlirInferShapedTypeOpInterfaceInferReturnTypes | ( | MlirStringRef | opName, |
| MlirContext | context, | ||
| MlirLocation | location, | ||
| intptr_t | nOperands, | ||
| MlirValue * | operands, | ||
| MlirAttribute | attributes, | ||
| void * | properties, | ||
| intptr_t | nRegions, | ||
| MlirRegion * | regions, | ||
| MlirShapedTypeComponentsCallback | callback, | ||
| void * | userData ) |
Infers the return shaped type components of the operation.
Calls callback with the types of inferred arguments on success. Returns failure otherwise.
Definition at line 134 of file Interfaces.cpp.
References mlirLogicalResultFailure(), mlirLogicalResultSuccess(), unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyInferShapedTypeOpInterface::inferReturnTypeComponents().
| MLIR_CAPI_EXPORTED MlirTypeID mlirInferShapedTypeOpInterfaceTypeID | ( | void | ) |
Returns the interface TypeID of the InferShapedTypeOpInterface.
Definition at line 130 of file Interfaces.cpp.
References wrap().
| MLIR_CAPI_EXPORTED MlirLogicalResult mlirInferTypeOpInterfaceInferReturnTypes | ( | MlirStringRef | opName, |
| MlirContext | context, | ||
| MlirLocation | location, | ||
| intptr_t | nOperands, | ||
| MlirValue * | operands, | ||
| MlirAttribute | attributes, | ||
| void * | properties, | ||
| intptr_t | nRegions, | ||
| MlirRegion * | regions, | ||
| MlirTypesCallback | callback, | ||
| void * | userData ) |
Infers the return types of the operation identified by its canonical given the arguments that will be supplied to its generic builder.
Calls callback with the types of inferred arguments, potentially several times, on success. Returns failure otherwise.
Definition at line 93 of file Interfaces.cpp.
References MlirStringRef::data, MlirStringRef::length, mlirLogicalResultFailure(), mlirLogicalResultSuccess(), unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyInferTypeOpInterface::inferReturnTypes().
| MLIR_CAPI_EXPORTED MlirTypeID mlirInferTypeOpInterfaceTypeID | ( | void | ) |
Returns the interface TypeID of the InferTypeOpInterface.
Definition at line 89 of file Interfaces.cpp.
References wrap().
| MLIR_CAPI_EXPORTED MlirTypeID mlirMemoryEffectGetEffectID | ( | MlirMemoryEffect | effect | ) |
Returns the TypeID identifying the concrete type of the given memory effect.
Definition at line 302 of file Interfaces.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRInterfaces().
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance mlirMemoryEffectInstanceClone | ( | MlirMemoryEffectInstance | instance | ) |
Creates a copy of a memory effect instance.
The caller must destroy the returned instance with mlirMemoryEffectInstanceDestroy.
Definition at line 356 of file Interfaces.cpp.
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance mlirMemoryEffectInstanceCreate | ( | MlirMemoryEffect | effect, |
| MlirAttribute | parameters, | ||
| int | stage, | ||
| bool | effectOnFullRegion, | ||
| MlirSideEffectResource | resource ) |
Creates a memory effect instance without an associated IR entity.
parameters may be a null attribute. The caller owns the returned instance and must destroy it with mlirMemoryEffectInstanceDestroy.
Definition at line 311 of file Interfaces.cpp.
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance mlirMemoryEffectInstanceCreateForBlockArgument | ( | MlirMemoryEffect | effect, |
| MlirValue | blockArgument, | ||
| MlirAttribute | parameters, | ||
| int | stage, | ||
| bool | effectOnFullRegion, | ||
| MlirSideEffectResource | resource ) |
Creates a memory effect instance associated with a block argument.
blockArgument must wrap a BlockArgument. parameters may be a null attribute. The caller owns the returned instance and must destroy it with mlirMemoryEffectInstanceDestroy.
Definition at line 335 of file Interfaces.cpp.
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance mlirMemoryEffectInstanceCreateForOpOperand | ( | MlirMemoryEffect | effect, |
| MlirOpOperand | opOperand, | ||
| MlirAttribute | parameters, | ||
| int | stage, | ||
| bool | effectOnFullRegion, | ||
| MlirSideEffectResource | resource ) |
Creates a memory effect instance associated with an operation operand.
parameters may be a null attribute. The caller owns the returned instance and must destroy it with mlirMemoryEffectInstanceDestroy.
Definition at line 319 of file Interfaces.cpp.
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance mlirMemoryEffectInstanceCreateForOpResult | ( | MlirMemoryEffect | effect, |
| MlirValue | result, | ||
| MlirAttribute | parameters, | ||
| int | stage, | ||
| bool | effectOnFullRegion, | ||
| MlirSideEffectResource | resource ) |
Creates a memory effect instance associated with an operation result.
result must wrap an OpResult. parameters may be a null attribute. The caller owns the returned instance and must destroy it with mlirMemoryEffectInstanceDestroy.
Definition at line 327 of file Interfaces.cpp.
| MLIR_CAPI_EXPORTED MlirMemoryEffectInstance mlirMemoryEffectInstanceCreateForSymbol | ( | MlirMemoryEffect | effect, |
| MlirAttribute | symbol, | ||
| MlirAttribute | parameters, | ||
| int | stage, | ||
| bool | effectOnFullRegion, | ||
| MlirSideEffectResource | resource ) |
Creates a memory effect instance associated with a symbol.
symbol must be a SymbolRefAttr. parameters may be a null attribute. The caller owns the returned instance and must destroy it with mlirMemoryEffectInstanceDestroy.
Definition at line 343 of file Interfaces.cpp.
| MLIR_CAPI_EXPORTED void mlirMemoryEffectInstanceDestroy | ( | MlirMemoryEffectInstance | instance | ) |
Destroys a memory effect instance created or cloned by APIs above.
Definition at line 351 of file Interfaces.cpp.
References unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::~PyMemoryEffectInstance().
| MLIR_CAPI_EXPORTED MlirMemoryEffect mlirMemoryEffectInstanceGetEffect | ( | MlirMemoryEffectInstance | instance | ) |
Returns the memory effect of the given instance.
Definition at line 361 of file Interfaces.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::getEffect().
| MLIR_CAPI_EXPORTED bool mlirMemoryEffectInstanceGetEffectOnFullRegion | ( | MlirMemoryEffectInstance | instance | ) |
Returns true if the given instance has effect on every single value of the resource.
Definition at line 374 of file Interfaces.cpp.
References unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::getEffectOnFullRegion().
| MLIR_CAPI_EXPORTED MlirAttribute mlirMemoryEffectInstanceGetParameters | ( | MlirMemoryEffectInstance | instance | ) |
Returns the parameters of the given instance, or a null attribute if there are no parameters.
Definition at line 380 of file Interfaces.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::getParameters().
| MLIR_CAPI_EXPORTED MlirSideEffectResource mlirMemoryEffectInstanceGetResource | ( | MlirMemoryEffectInstance | instance | ) |
Returns the side effect resource of the given instance.
Definition at line 366 of file Interfaces.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::getResource().
| MLIR_CAPI_EXPORTED int mlirMemoryEffectInstanceGetStage | ( | MlirMemoryEffectInstance | instance | ) |
Returns the stage of the given instance.
Definition at line 370 of file Interfaces.cpp.
References unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::getStage().
| MLIR_CAPI_EXPORTED MlirAttribute mlirMemoryEffectInstanceGetSymbolRef | ( | MlirMemoryEffectInstance | instance | ) |
Returns the symbol reference of the given instance, or a null attribute if there is no associated symbol.
Definition at line 389 of file Interfaces.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::getSymbolRef().
| MLIR_CAPI_EXPORTED MlirValue mlirMemoryEffectInstanceGetValue | ( | MlirMemoryEffectInstance | instance | ) |
Returns the value (OpOperand, OpResult, or BlockArgument) of the given instance, or a null value if there is no associated value.
Definition at line 384 of file Interfaces.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectInstance::getValue().
| MLIR_CAPI_EXPORTED MlirMemoryEffect mlirMemoryEffectsAllocateGet | ( | void | ) |
Returns the singleton instance of the allocate memory effect.
Definition at line 284 of file Interfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, Effect >::get(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRInterfaces().
| MLIR_CAPI_EXPORTED MlirMemoryEffect mlirMemoryEffectsFreeGet | ( | void | ) |
Returns the singleton instance of the free memory effect.
Definition at line 289 of file Interfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, Effect >::get(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRInterfaces().
| MLIR_CAPI_EXPORTED void mlirMemoryEffectsOpInterfaceAttachFallbackModel | ( | MlirContext | ctx, |
| MlirStringRef | opName, | ||
| MlirMemoryEffectsOpInterfaceCallbacks | callbacks ) |
Attach a new FallbackModel for the MemoryEffectsOpInterface to the named operation.
The FallbackModel will call the provided callbacks.
Attach a new FallbackModel for the MemoryEffectsOpInterface to the named operation.
The FallbackModel uses the provided callbacks to implement the interface.
Definition at line 450 of file Interfaces.cpp.
References mlir::RegisteredOperationName::lookup(), MemoryEffectOpInterfaceFallbackModel::setCallbacks(), and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectsOpInterface::attach().
| MLIR_CAPI_EXPORTED void mlirMemoryEffectsOpInterfaceGetEffects | ( | MlirOperation | operation, |
| MlirMemoryEffectInstancesCallback | callback, | ||
| void * | userData ) |
Gets the memory effects of the given operation.
The operation must implement the MemoryEffectsOpInterface. Invokes callback once with all effects. Ownership is not transferred; call mlirMemoryEffectInstanceClone from the callback to keep a copy after the callback returns.
Definition at line 469 of file Interfaces.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMemoryEffectsOpInterface::getEffects().
| MLIR_CAPI_EXPORTED MlirTypeID mlirMemoryEffectsOpInterfaceTypeID | ( | void | ) |
Returns the interface TypeID of the MemoryEffectsOpInterface.
Definition at line 393 of file Interfaces.cpp.
References wrap().
| MLIR_CAPI_EXPORTED MlirMemoryEffect mlirMemoryEffectsReadGet | ( | void | ) |
Returns the singleton instance of the read memory effect.
Definition at line 293 of file Interfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, Effect >::get(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRInterfaces().
| MLIR_CAPI_EXPORTED MlirMemoryEffect mlirMemoryEffectsWriteGet | ( | void | ) |
Returns the singleton instance of the write memory effect.
Definition at line 297 of file Interfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, Effect >::get(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRInterfaces().
| MLIR_CAPI_EXPORTED bool mlirOperationImplementsInterface | ( | MlirOperation | operation, |
| MlirTypeID | interfaceTypeID ) |
Returns true if the given operation implements an interface identified by its TypeID.
Definition at line 74 of file Interfaces.cpp.
References unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteOpInterface< ConcreteIface >::PyConcreteOpInterface().
| MLIR_CAPI_EXPORTED bool mlirOperationImplementsInterfaceStatic | ( | MlirStringRef | operationName, |
| MlirContext | context, | ||
| MlirTypeID | interfaceTypeID ) |
Returns true if the operation identified by its canonical string name implements the interface identified by its TypeID in the given context.
Note that interfaces may be attached to operations in some contexts and not others.
Definition at line 81 of file Interfaces.cpp.
References MlirStringRef::data, MlirStringRef::length, mlir::RegisteredOperationName::lookup(), and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteOpInterface< ConcreteIface >::PyConcreteOpInterface().
| MLIR_CAPI_EXPORTED MlirSideEffectResource mlirSideEffectsDefaultResourceGet | ( | void | ) |
Returns the singleton instance of the default side effect resource.
Definition at line 306 of file Interfaces.cpp.
References mlir::SideEffects::Resource::Base< DefaultResource >::get(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRInterfaces().