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

Simplify code #2

Open
denniskb opened this issue Sep 10, 2021 · 2 comments
Open

Simplify code #2

denniskb opened this issue Sep 10, 2021 · 2 comments

Comments

@denniskb
Copy link

denniskb commented Sep 10, 2021

I'm a fond user of xoroshiro myself and a C++ programmer. Thank you for this great work!

There is a lot of common, redundant code between the simulators generators. Have you ever considered writing a generic, templated master class and then defining individual RNGs as parameterizations of it?

using XoroShrio256PlusPlus = XoroShiro<256, 64, variant::pp>;
@denniskb
Copy link
Author

Would be happy to do the refactoring if you think it's worthwhile..

@Reputeless
Copy link
Owner

I think making generator classes templatized could bring unnecessary complexity for maintainers and misuse of API.
Instead of templatization, identical jump functions can call a common function to remove redundant code. It will reduce LoC by 10~20%. I will try this in the next update.

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

No branches or pull requests

2 participants