Expand description
Product device-policy adapter for the canonical scientific kernel.
Constants§
- KIN_
STEP_ ENTRY - Entry-point name of
KIN_STEP_WGSL. - KIN_
STEP_ WGSL - The N-body step kernel source (embedded from the canonical
.wgsl). - KIN_
STRIDE - Scalars per particle in the flat state buffer.
Functions§
- nbody_
step_ cpu - Exact CPU oracle for one N-body step. Reads
state_in, returns the new state (same length), mirroring the WGSL scalar-for-scalar: forces accumulated in increasing-jorder (skipping self),1/(r²+soft)^{3/2}viar2 * sqrt(r2), thenvthenxusing the newv. Particles withmass == 0take a zero inverse mass. - nbody_
step_ gpu