public struct PhiloxRandomNumberGenerator : SeedableRandomNumberGenerator

An implementation of SeedableRandomNumberGenerator using Philox. Salmon et al. SC 2011. Parallel random numbers: as easy as 1, 2, 3. http://www.thesalmons.org/john/random123/papers/random123sc11.pdf

This struct implements a 10-round Philox4x32 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: PhiloxRandomNumberGenerator
  • Declaration

    public init(seed: [UInt8])
  • Declaration

    public mutating func next() -> UInt64