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.

27 lines
421 B

#pragma once
#include "../common.h"
#include "../rng.h"
#include "../mem.h"
namespace rng
{
struct crand final : public Random
{
crand();
crand(u64 seed);
inline ~crand(){}
protected:
f64 _sample() override;
private:
struct _opaque;
struct _deleter { static void delete_object(_opaque** st); };
mem::aligned_ptr<_opaque, _deleter> _state;
explicit crand(_opaque* raw);
i64 _sample_raw();
};
}