Module: MLIR::CAPI

Extended by:
FFI::Library
Defined in:
lib/mlir.rb

Overview

FFI wrapper for MLIR C API

Defined Under Namespace

Classes: MlirArrayRef, MlirDialectHandle, MlirNamedAttribute, MlirOperationState, MlirStringRef

Constant Summary collapse

IR_C_API_STRUCT_SYMBOLS =
%i[
  MlirAsmState
  MlirBytecodeWriterConfig
  MlirContext
  MlirDialect
  MlirDialectRegistry
  MlirOperation
  MlirOpOperand
  MlirOpPrintingFlags
  MlirBlock
  MlirRegion
  MlirSymbolTable
  MlirAttribute
  MlirIdentifier
  MlirLocation
  MlirModule
  MlirType
  MlirValue
].freeze

Class Method Summary collapse

Class Method Details

.register_all_upstream_dialects(context) ⇒ Object



169
170
171
172
173
174
# File 'lib/mlir.rb', line 169

def register_all_upstream_dialects(context)
  dialect_registry = mlirDialectRegistryCreate
  mlirRegisterAllDialects(dialect_registry)
  mlirContextAppendDialectRegistry(context, dialect_registry)
  mlirDialectRegistryDestroy(dialect_registry)
end