Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent generator naming #33

Open
grigorymx opened this issue Dec 23, 2017 · 0 comments
Open

Inconsistent generator naming #33

grigorymx opened this issue Dec 23, 2017 · 0 comments

Comments

@grigorymx
Copy link

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<6,16,true>     pcg32_k64;
typedef pcg_engines::ext_mcg_xsh_rs_64_32<6,32,true>        pcg32_k64_oneseq;
typedef pcg_engines::ext_oneseq_xsh_rs_64_32<6,32,true>     pcg32_k64_fast;

pcg32_k64_oneseq is based on the mcg, and pcg32_k64_fast is based on the oneseq generator.

But on line 1732

typedef pcg_engines::ext_setseq_xsl_rr_128_64<5,16,true>    pcg64_k32;
typedef pcg_engines::ext_oneseq_xsl_rr_128_64<5,128,true>   pcg64_k32_oneseq;
typedef pcg_engines::ext_mcg_xsl_rr_128_64<5,128,true>      pcg64_k32_fast;

pcg64_k32_oneseq is based on the oneseq generator, and pcg64_k32_fast is based on the mcg.

After further investigation, I discovered the following.
The base generator are declared as follows (line 1686)

typedef pcg_engines::setseq_xsh_rr_64_32        pcg32;
typedef pcg_engines::oneseq_xsh_rr_64_32        pcg32_oneseq;
typedef pcg_engines::unique_xsh_rr_64_32        pcg32_unique;
typedef pcg_engines::mcg_xsh_rs_64_32           pcg32_fast;

Where pcg32_oneseq is based on oneseq generator and pcg32_fast is based on mcg generator.
But multiple extended fast generators (pcg32_k2_fast, pcg32_k64_fast, pcg32_k1024_fast, pcg32_c1024_fast, pcg64_k1024_fast, pcg64_c1024_fast, pcg32_k16384_fast) are based on oneseq generator while other fast generators (pcg32_c64_fast, pcg64_k32_fast, pcg64_c32_fast) are based on mcg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant