pcg-cpp icon indicating copy to clipboard operation
pcg-cpp copied to clipboard

PCG — C++ Implementation

Results 46 pcg-cpp issues
Sort by recently updated
recently updated
newest added

Inheritance is often a code smell. Composition is usually cleaner. Porting the full code to a language without templates was painfully difficult. The least concern was that sometimes the names...

While investigating the source code, I've found several generators with the inconsistent names. In file pcg_random.hpp on line 1724 ``` typedef pcg_engines::ext_setseq_xsh_rr_64_32 pcg32_k64; typedef pcg_engines::ext_mcg_xsh_rs_64_32 pcg32_k64_oneseq; typedef pcg_engines::ext_oneseq_xsh_rs_64_32 pcg32_k64_fast; ```...

Can anyone tell me if the current c++ implementation of the PCG random number generator thread safe?

Things I noticed by hand: * `struct rxs_mixin` has its function called `output_rxs` rather than just plain `output`, which would prevent it from being used as an `output_mixin` if it...

If `seed` (or, for extended generators `data` - it's fine to omit `stream`) is omitted for any given constructor/seed call, the sanest default is to seed from `/dev/urandom` by default....

I have enabled some helpful compiler warnings and started to fix some problems, which you find in separate commits. Especially clang was really helpful here. There are still some possible...

I'd like to store my rng as a class member, as I have many methods that require it in my class. Something like: ``` class MyClass { pcg32 rng; //...

Forward declaration is sufficient for the library.

Since all options available in MS Visual Studio 2022, were failing: ![image](https://user-images.githubusercontent.com/13116598/197340611-f87fadc8-af21-4ca3-8b54-9a765602aa58.png) I decided to try with the GNU C++ compiler (v11 and v12) using the default Makefile, but I...

Michael made some exploits to the DXSM output scrambler. See: https://guru.multimedia.cx/how-correlated-is-pcg-dxsm-output/