Jump Stride Enumeration
Specifies the stride size for jump-based stream partitioning.
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public enum JumpStrideRemarks
JumpStride is used by RandomStreamPartition<TRandom> to control the spacing between streams when using jump-based partitioning. Different strides provide different trade-offs between stream separation and total sequence coverage.
Typical Usage Patterns:
- Jump: Use for fine-grained parallelism where many relatively short streams are needed (e.g., parallel work items).
- LongJump: Use for coarse-grained parallelism where fewer but longer streams are needed (e.g., parallel processes or threads).
Hierarchical Partitioning:
Different strides can be used at different levels of the hierarchy to create two-level partitioning schemes:
// Coarse-grained: separate threads/processes
var processes = new RandomStreamPartition<Xoshiro256>(
options, JumpStride.LongJump);
// Fine-grained: work items within a process
var workItems = processes.Branch(processId, JumpStride.Jump);
Members
| Jump | 0 | Uses the primary jump operation (Jump(UInt64)). |
| LongJump | 1 | Uses the long jump operation (LongJump(UInt64)). |