In your field#
The same kernel language, five fields. A lane is one run of the kernel body, and a sample is one independent element of work. Each card links two ways in: write the kernel in hawk, or compose the flow around it in eagle (graphs, loops, copies, early stop). Every example runs on a CPU at a small size and on a GPU at a larger one. The pictures here are from those notebooks; nothing on this page is a timing.
Finite elements
Each triangle hands a share of its load to its three corners, and a node shared by several triangles collects them all.
Heat diffusion
A grid of cells, each stepped from its four neighbours; the animation is the plate cooling.
Fluids
Shallow water on a 2-D grid, with the total water checked at the end.
Monte Carlo
An ensemble of projectiles, each stopping at its own impact; finished ones leave the launch.
Particle binning
Add each particle's weight into its cell; if the particles are already sorted by cell, each run of the same cell is added in one go.
Not your field? These are the same few words: a grid of lanes, a read of a neighbour, a sum or a scatter across lanes.
Batched small matrices shows the
plainest use of them, checked against einsum.