Grid
Grid is numeric arrays on the metal. That is the NumPy job. The name is Buraaq's.
No guest Python. No BLAS ceremony in application source. zeros(2, 2) is the whole constructor.
fn main() {
g = zeros(2, 2)
put_at(g, 0, 0, 1.5)
println(at(g, 0, 0))
println(dot(row("1,2,3"), row("4,5,6")))
}
| API | What it does |
|---|---|
zeros / ones / fill / eye / linspace / row | Build |
at / put_at / nrows / ncols | Cells |
plus / times / scale / matmul / dot / transpose | Linear algebra |
sum / mean / least / most / norm | Reductions |
sin_all / cos_all / view | Map and print |
Scalars live in std.math (sin, pow, pi, …). Arrays live here.
Gate B hot loops are ordinary for / while over ints and floats: Grid is for the matrix work those loops become. Measured numbers: performance.
Next: Testing.
