My Project
Classes | Typedefs | Functions
Core.h File Reference
#include <stdint.h>
Include dependency graph for Core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  int64_list_t
 
struct  mlir_type_list_t
 
struct  mlir_named_attr_t
 
struct  mlir_named_attr_list_t
 

Typedefs

typedef void * mlir_context_t
 
typedef const void * mlir_type_t
 Opaque C type for mlir::Type. More...
 
typedef void * mlir_func_t
 Opaque C type for mlir::FuncOp. More...
 
typedef const void * mlir_attr_t
 Opaque C type for mlir::Attribute. More...
 

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...
 
mlir_type_t mlirParseType (const char *type, mlir_context_t context, uint64_t *charsRead)
 
unsigned getFunctionArity (mlir_func_t function)
 Returns the arity of function. More...
 
unsigned getRankOfFunctionArgument (mlir_func_t function, unsigned pos)
 
mlir_type_t getTypeOfFunctionArgument (mlir_func_t function, unsigned pos)
 Returns an opaque mlir::Type of the function argument at position pos. More...
 

Typedef Documentation

◆ mlir_attr_t

typedef const void* mlir_attr_t

Opaque C type for mlir::Attribute.

◆ mlir_context_t

typedef void* mlir_context_t

Opaque MLIR types. Opaque C type for mlir::MLIRContext*.

◆ mlir_func_t

typedef void* mlir_func_t

Opaque C type for mlir::FuncOp.

◆ mlir_type_t

typedef const void* mlir_type_t

Opaque C type for mlir::Type.

Function Documentation

◆ getFunctionArity()

unsigned getFunctionArity ( mlir_func_t  function)

Returns the arity of function.

◆ getRankOfFunctionArgument()

unsigned getRankOfFunctionArgument ( mlir_func_t  function,
unsigned  pos 
)

Returns the rank of the function argument at position pos. If the argument is of MemRefType, this returns the rank of the MemRef. Otherwise returns 0. TODO(ntv): support more than MemRefType and scalar Type.

◆ getTypeOfFunctionArgument()

mlir_type_t getTypeOfFunctionArgument ( mlir_func_t  function,
unsigned  pos 
)

Returns an opaque mlir::Type of the function argument at position pos.

◆ 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.