My Project
Functions
CoreAPIs.cpp File Reference
#include "mlir-c/Core.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Function.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Parser.h"
#include "llvm/ADT/StringSwitch.h"
Include dependency graph for CoreAPIs.cpp:

Functions

mlir_type_t makeMemRefType (mlir_context_t context, mlir_type_t elemType, int64_list_t sizes)
 Minimal C API for exposing EDSCs to Swift, Python and other languages. More...
 
mlir_type_t makeFunctionType (mlir_context_t context, mlir_type_list_t inputs, mlir_type_list_t outputs)
 
mlir_type_t makeIndexType (mlir_context_t context)
 Returns an mlir::IndexType. More...
 
mlir_attr_t makeIntegerAttr (mlir_type_t type, int64_t value)
 
mlir_attr_t makeBoolAttr (mlir_context_t context, bool value)
 Returns an mlir::BoolAttr with the given value. More...
 
mlir_attr_t makeFloatAttr (mlir_context_t context, float value)
 Returns an mlir::FloatAttr with the given value. More...
 
mlir_attr_t makeStringAttr (mlir_context_t context, const char *value)
 Returns an mlir::StringAttr with the given value. More...
 
unsigned getFunctionArity (mlir_func_t function)
 Returns the arity of function. More...
 
mlir_type_t mlirParseType (const char *type, mlir_context_t context, uint64_t *charsRead)
 

Function Documentation

◆ getFunctionArity()

unsigned getFunctionArity ( mlir_func_t  function)

Returns the arity of function.

◆ makeBoolAttr()

mlir_attr_t makeBoolAttr ( mlir_context_t  context,
bool  value 
)

Returns an mlir::BoolAttr with the given value.

◆ makeFloatAttr()

mlir_attr_t makeFloatAttr ( mlir_context_t  context,
float  value 
)

Returns an mlir::FloatAttr with the given value.

◆ makeFunctionType()

mlir_type_t makeFunctionType ( mlir_context_t  context,
mlir_type_list_t  inputs,
mlir_type_list_t  outputs 
)

Returns an mlir::FunctionType of the element type elemType and shape sizes.

◆ makeIndexType()

mlir_type_t makeIndexType ( mlir_context_t  context)

Returns an mlir::IndexType.

◆ makeIntegerAttr()

mlir_attr_t makeIntegerAttr ( mlir_type_t  type,
int64_t  value 
)

Returns an mlir::IntegerAttr of the specified type that contains the given value.

◆ makeMemRefType()

mlir_type_t makeMemRefType ( mlir_context_t  context,
mlir_type_t  elemType,
int64_list_t  sizes 
)

Minimal C API for exposing EDSCs to Swift, Python and other languages.

Returns an mlir::MemRefType of the element type elemType and shape sizes.

◆ makeStringAttr()

mlir_attr_t makeStringAttr ( mlir_context_t  context,
const char *  value 
)

Returns an mlir::StringAttr with the given value.

◆ mlirParseType()

mlir_type_t mlirParseType ( const char *  type,
mlir_context_t  context,
uint64_t *  charsRead 
)

Parses an MLIR type from the string type in the given context. Returns a NULL type on error. If non-NULL, charsRead will contain the number of characters that were processed by the parser.