PcgRandom.h
// PcgRandom.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2020
#pragma once
#ifndef Ceda_cxUtils_PcgRandom_H
#define Ceda_cxUtils_PcgRandom_H
#include "cxUtils.h"
namespace ceda
{
struct xorshift64s_state
{
uint64_t a;
};
cxUtils_API uint64_t xorshift64s(struct xorshift64s_state *state);
// *Really* minimal PCG32 code / (c) 2014 M.E. O'Neill / pcg-random.org
// Licensed under Apache License 2.0 (NO WARRANTY, etc. see website)
typedef struct { uint64_t state; uint64_t inc; } pcg32_random_t;
cxUtils_API uint32_t pcg32_random_r(pcg32_random_t* rng);
} // namespace ceda
#endif // include guard