Stay organized with collections Save and categorize content based on your preferences.
public struct PhiloxRandomNumberGenerator : SeedableRandomNumberGenerator

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

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(uint64Seed seed: UInt64)
  • Declaration

    public init(seed: [UInt8])
  • Declaration

    public mutating mutating func next() -> UInt64