Expand description
FDTD kernel defined using the Rust DSL.
This module demonstrates how to define stencil kernels in pure Rust that get transpiled to CUDA at compile time.
The generated CUDA code is equivalent to the handwritten version in
shaders/fdtd_tile.cu, but is written in a high-level Rust DSL.
Structs§
- GridPos
- CPU-side GridPos for when cuda-codegen is not enabled.
Functions§
- fdtd_
tile_ step_ dsl - Run FDTD on an entire tile using the DSL kernel.
- fdtd_
wave_ step_ cpu - FDTD wave equation kernel for 16x16 tiles with 1-cell halo.
- fdtd_
wave_ step_ dsl - FDTD wave equation kernel using the GridPos DSL.
- generate_
fdtd_ cuda - handwritten_
fdtd_ cuda - Get the handwritten CUDA source for comparison.