MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / nextSeed

Function nextSeed

src/compute-engine/numerics/random.ts:28–33  ·  view source on GitHub ↗
(seed: number)

Source from the content-addressed store, hash-verified

26// See `docs/RANDOMNESS-MODEL.md` §2 and §4. The
27// n-th draw of a `WithRandomSeed` frame is a PURE function of the seed and the
28// draw index: `hash(seed, n)`, with no mutable stream state. That is what lets
29// the interpreter, the JS target and (as f32) the GPU targets agree.
30//
31// The seed→stream mapping is a CROSS-VERSION CONTRACT: changing any constant
32// or operation order below re-randomizes every stored document. It is pinned
33// by `test/compute-engine/random-vectors.test.ts`.
34//
35
36/**

Callers 2

collections.tsFile · 0.90
statistics.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected