You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(sysrap): make shared RNG use explicit via traits (#300)
This removes fragile include-order coupling around the global `RNG`
alias. Shared headers like
`sysrap/storch.h` were implicitly depending on callers to define `using
RNG = ...` before inclusion,
which made CPU mock paths and CUDA paths easy to break when a header
pulled in `sysrap/srng.h`
directly.
The change makes `RNG` selection explicit at call sites by templating
shared generation functions
over the `RNG` type and routing random access through `srng_traits`. CPU
code can now pass `srngcpu`
directly, while CUDA code continues to use the selected device `RNG`.
This keeps CPU mock generation
and GPU generation sharing the same implementation without relying on
hidden global alias state.
0 commit comments