Struct Xoshiro256State
Represents the complete serializable internal state of a Xoshiro256StarStar random number generator. Capturing this struct and passing it back to SetState(Xoshiro256State) fully restores the generator to the exact point it was when the snapshot was taken, enabling deterministic save/load and replay.
Inherited Members
Namespace: Scylla.Core.Util.Random
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public struct Xoshiro256State
Remarks
The four 64-bit state words correspond directly to the s[0]..s[3] fields of
the reference xoshiro256** algorithm (Vigna/Blackman, 2018). The state must never be
all-zeros; SetState(Xoshiro256State) enforces this invariant
automatically.
Fields
S0
The first 64-bit word of the xoshiro256** generator state (s[0]).
Part of the 256-bit state that drives the generator's period of 2^256 - 1.
Declaration
public ulong S0
Field Value
| Type | Description |
|---|---|
| ulong |
S1
The second 64-bit word of the xoshiro256** generator state (s[1]).
This word is the source operand for the generator's star-star output scrambler.
Declaration
public ulong S1
Field Value
| Type | Description |
|---|---|
| ulong |
S2
The third 64-bit word of the xoshiro256** generator state (s[2]).
Participates in the XOR and rotate update step of the xoshiro256** algorithm.
Declaration
public ulong S2
Field Value
| Type | Description |
|---|---|
| ulong |
S3
The fourth 64-bit word of the xoshiro256** generator state (s[3]).
Receives a 45-bit left rotation on each step; set to 1 as a fallback
when the full state would otherwise be all-zeros.
Declaration
public ulong S3
Field Value
| Type | Description |
|---|---|
| ulong |