Skip to main content

Module kinematics

Module kinematics 

Source
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-j order (skipping self), 1/(r²+soft)^{3/2} via r2 * sqrt(r2), then v then x using the new v. Particles with mass == 0 take a zero inverse mass.
nbody_step_gpu