TypeScript 風の文法で書く、静的型の小さな言語です。LLVM を通して、GC なしのネイティブバイナリと WebAssembly にコンパイルします。CPU と GPU のコードを同じソース(.um)に書けます。
struct Particle { pos: f32; vel: f32;}
// kernel は添字ごとに 1 回ずつ、CPU(全コア)か GPU で実行される。kernel function integrate(i: u32, ps: mut Buffer<Particle>, dt: f32): void { ps[i].pos = ps[i].pos + ps[i].vel * dt;}
export function main(): i32 { let ps = new Buffer<Particle>(1000); // 長さ固定、ゼロ埋め ps[0].vel = 2; dispatch(integrate, ps.length, mut ps, 0.5); print(ps[0].pos); // 1 return 0;}