You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
339 B
14 lines
339 B
#include <seed.h>
|
|
|
|
extern "C" {
|
|
// TODO: XXX: how to return a god damn array without typedef ffs????
|
|
extern u64 (*sm64_compute[2])(u64, u64);
|
|
}
|
|
|
|
namespace rng::seed
|
|
{
|
|
splitmix64::splitmix64(u64 u) : m_state(sm64_compute(u, 0)){}
|
|
|
|
sm128 splitmix64::generate_seed() { return sm128 { m_state = sm64_compute(m_state[0], m_state[1]) }; }
|
|
}
|