Skip to main content

ringkernel_wavesim/simulation/
mod.rs

1//! Simulation core for 2D acoustic wave propagation.
2
3mod cell;
4pub mod educational;
5mod grid;
6mod kernel_grid;
7mod physics;
8mod tile_grid;
9
10// FDTD kernel defined in Rust DSL (transpiled to CUDA at compile time)
11pub mod fdtd_dsl;
12
13// All CUDA kernels generated from Rust DSL
14pub mod kernels;
15
16#[cfg(feature = "simd")]
17mod simd;
18
19// GPU backend abstraction and implementations
20pub mod gpu_backend;
21
22#[cfg(feature = "wgpu")]
23mod gpu_compute;
24
25#[cfg(feature = "wgpu")]
26pub mod wgpu_compute;
27
28#[cfg(feature = "cuda")]
29pub mod cuda_compute;
30
31#[cfg(feature = "cuda")]
32pub mod cuda_packed;
33
34pub use cell::{CellState, Direction};
35pub use educational::{
36    EducationalProcessor, ProcessingState, SimulationMode, StepResult, TileMessage,
37};
38pub use grid::{CellType, SimulationGrid};
39pub use kernel_grid::KernelGrid;
40pub use physics::AcousticParams;
41pub use tile_grid::{
42    GpuPersistentBackend, HaloDirection, TileActor, TileKernelGrid, DEFAULT_TILE_SIZE,
43};
44
45// GPU backend trait and types
46pub use gpu_backend::{BoundaryCondition, Edge, FdtdParams, TileGpuBackend, TileGpuBuffers};
47
48#[cfg(feature = "wgpu")]
49pub use gpu_compute::{init_wgpu, TileBuffers, TileFdtdParams, TileGpuCompute, TileGpuComputePool};
50
51#[cfg(feature = "wgpu")]
52pub use wgpu_compute::WgpuTileBackend;
53
54#[cfg(feature = "cuda")]
55pub use cuda_compute::CudaTileBackend;
56
57#[cfg(feature = "cuda")]
58pub use cuda_packed::CudaPackedBackend;