Skip to main content

Module sim_thread

Module sim_thread 

Source
Expand description

The GPU runner GpuSimThread. It steps a GPU-resident state in batched submissions.

GpuSimThread is the counterpart of crate::cpu::sim_thread::SimThread, and crate::runner drives it the same way. A batch of batch_size steps goes out in submissions of at most crate::gpu::MAX_STEPS_PER_SUBMISSION steps each, with one batch outstanding at a time. The display and stats passes run once per snapshot interval, whatever the batch size. In adaptive mode the batch size tracks a wall-clock budget per batch, target_ms.

Structs§

GpuBatchSettings
Initial adaptive-batching settings, so a freshly spawned thread starts in whatever mode the UI is already showing rather than snapping back to the default.
GpuSimThread
Handle on a running GPU simulation, driven by the same commands as a SimThread.
GpuStats
Live GPU-runner numbers that have no CPU counterpart, polled by the UI once per frame.

Enums§

GpuCommand
GPU-runner-specific commands, on top of the shared crate::cpu::sim_thread::SimCommand.

Traits§

GpuSimState
Runner interface of a GPU state, driven by GpuSimThread on top of SimState.