Charms.Defm (charms v0.1.1)

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

  • use beaver's DSL to define intrinsics which can be called in the function body of a defm
  • use defm to define functions that can be JIT-compiled

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

create an MLIR operation

create an MLIR operation and return the result value(s)

while loop

Functions

Link to this macro

call(arg)

(macro)

call a local function with return

Link to this macro

call(mod, arg)

(macro)

call a function defined in another Charms module with return

Link to this macro

cond_br(condition, clauses)

(macro)

cond expression requires identical types for both branches

Link to this macro

const(_)

(macro)

syntax sugar to create an MLIR value from an Elixir value

Link to this macro

for_loop(expr, list)

(macro)

for loop

Link to this macro

op(_)

(macro)

create an MLIR operation

Link to this macro

value(expr)

(macro)

create an MLIR operation and return the result value(s)

Link to this macro

while(expr, list)

(macro)

while loop