Tutorials#
Five notebooks, 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.
- 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.- 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.