// Copyright © 2023 Apple Inc. #pragma once #include #include namespace mlx::core::random { /** Applies the Threefry 2x32 hash function. * This code is based on the Jax counter-based and splittable PRNG * https://github.com/google/jax/blob/main/docs/jep/263-prng.md * * Original Threefry reference: * http://www.thesalmons.org/john/random123/papers/random123sc11.pdf */ std::pair threefry2x32_hash( const std::pair& key, std::pair count); } // namespace mlx::core::random