Charms.Defm (charms v0.1.2)
Charms.Defm is a DSL for defining functions that can be JIT-compiled.
This module defines the defm DSL syntax as macros and special forms.
Extending the defm
There are two kinds of functions in Charms:
- Intrinsic: use
beaver's DSL to define, which can be called in the function body of adefm defm: usedefmto define, can be JIT-compiled Although they are different in terms of underline implementation, they share the same syntax to invoke.
Summary
Functions
call a local function with return
call a function defined in another Charms module with return
cond expression requires identical types for both branches
syntax sugar to create an MLIR value from an Elixir value
for loop
create an MLIR operation
create an MLIR operation and return the result value(s)
while loop
Functions
call a local function with return
call a function defined in another Charms module with return
cond expression requires identical types for both branches
syntax sugar to create an MLIR value from an Elixir value
for loop
create an MLIR operation
create an MLIR operation and return the result value(s)
while loop