MLIR
17.0.0git
|
Go to the source code of this file.
Typedefs | |
typedef void(* | MlirTypesCallback) (intptr_t, MlirType *, void *) |
These callbacks are used to return multiple types from functions while transferring ownership to the caller. More... | |
Functions | |
MLIR_CAPI_EXPORTED bool | mlirOperationImplementsInterface (MlirOperation operation, MlirTypeID interfaceTypeID) |
Returns true if the given operation implements an interface identified by its TypeID. More... | |
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. More... | |
MLIR_CAPI_EXPORTED MlirTypeID | mlirInferTypeOpInterfaceTypeID () |
Returns the interface TypeID of the InferTypeOpInterface. More... | |
MLIR_CAPI_EXPORTED MlirLogicalResult | mlirInferTypeOpInterfaceInferReturnTypes (MlirStringRef opName, MlirContext context, MlirLocation location, intptr_t nOperands, MlirValue *operands, MlirAttribute attributes, 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. More... | |
typedef void(* MlirTypesCallback) (intptr_t, MlirType *, void *) |
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 51 of file Interfaces.h.
MLIR_CAPI_EXPORTED MlirLogicalResult mlirInferTypeOpInterfaceInferReturnTypes | ( | MlirStringRef | opName, |
MlirContext | context, | ||
MlirLocation | location, | ||
intptr_t | nOperands, | ||
MlirValue * | operands, | ||
MlirAttribute | attributes, | ||
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 39 of file Interfaces.cpp.
References MlirStringRef::data, mlir::failed(), MlirStringRef::length, mlir::RegisteredOperationName::lookup(), mlirAttributeIsNull(), mlirLocationIsNull(), mlirLogicalResultFailure(), mlirLogicalResultSuccess(), unwrap(), unwrapList(), and wrap().
Referenced by mlir::python::PyInferTypeOpInterface::inferReturnTypes().
MLIR_CAPI_EXPORTED MlirTypeID mlirInferTypeOpInterfaceTypeID | ( | ) |
Returns the interface TypeID of the InferTypeOpInterface.
Definition at line 35 of file Interfaces.cpp.
References wrap().
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 20 of file Interfaces.cpp.
References unwrap().
Referenced by mlir::python::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 27 of file Interfaces.cpp.
References MlirStringRef::data, MlirStringRef::length, mlir::RegisteredOperationName::lookup(), and unwrap().
Referenced by mlir::python::PyConcreteOpInterface< ConcreteIface >::PyConcreteOpInterface().