MLX
Loading...
Searching...
No Matches
threefry.h
Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
2
3#pragma once
4
5#include <cstdint>
6#include <utility>
7
9
17std::pair<uint32_t, uint32_t> threefry2x32_hash(
18 const std::pair<uint32_t, uint32_t>& key,
19 std::pair<uint32_t, uint32_t> count);
20
21} // namespace mlx::core::random
Definition threefry.h:8
std::pair< uint32_t, uint32_t > threefry2x32_hash(const std::pair< uint32_t, uint32_t > &key, std::pair< uint32_t, uint32_t > count)
Applies the Threefry 2x32 hash function.
array key(uint64_t seed)
Get a PRNG key from a seed.