Tutorials#
Five notebooks in two topics, each read in order. Each compiles and runs a small C++ program
through the same run_cpp() helper: g++ -std=c++23
-DAETHER_CPP_MODE=1 by default (no GPU or CUDA toolchain needed), and
nvcc on the SAME source when a GPU is visible.
Arrays and memory#
One array on two machines, and expressions that do not allocate.
- 1 — One array, two machines
Build an
aether::Array, read/write it through aView, and move it to the device and back with calls that are no-ops in a CPU-only build.- 2 — Expressions without temporaries
Compose
+/-/*into one expression tree, and see what it costs not to.
Device code#
Math that runs on both machines, your own device function, and a new function added to aether.
- 3 — Device math
Call
aether::math::erf,sincos,hypotthe same way from host code or a GPU kernel.- 4 — Your own device function and kernel
Write
AETHER_DEVICEHOST()once; dispatch it with a loop on the CPU or anAETHER_KERNEL()launch on the GPU.- 5 — Adding a function to aether
The macro scaffold behind
aether::math’s own dispatch, proved by adding a new function with it.