public struct ThreefryRandomNumberGenerator : SeedableRandomNumberGenerator

An implementation of SeedableRandomNumberGenerator using Threefry. Salmon et al. SC 2011. Parallel random numbers: as easy as 1, 2, 3.

This struct implements a 20-round Threefry2x32 PRNG. It must be seeded with a 64-bit value.

An individual generator is not thread-safe, but distinct generators do not share state. The random data generated is of high-quality, but is not suitable for cryptographic applications.

  • Declaration

    public static var global: ThreefryRandomNumberGenerator
  • Declaration

    public init(seed: [UInt8])
  • Declaration

    public mutating mutating func next() -> UInt64