Skip to content

Instantly share code, notes, and snippets.

@yohhoy
Created December 19, 2013 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yohhoy/8032377 to your computer and use it in GitHub Desktop.
Save yohhoy/8032377 to your computer and use it in GitHub Desktop.
dump size of PRNG objects in C++11 Standard.
#include <random>
#include <iostream>
int main()
{
std::cout <<
sizeof(std::size_t) << "\n"
"minstd_rand0 " << sizeof(std::minstd_rand0) << "\n"
"minstd_rand " << sizeof(std::minstd_rand) << "\n"
"mt19937 " << sizeof(std::mt19937) << "\n"
"mt19937_64 " << sizeof(std::mt19937_64) << "\n"
"ranlux24_base " << sizeof(std::ranlux24_base) << "\n"
"ranlux48_base " << sizeof(std::ranlux48_base) << "\n"
"ranlux24 " << sizeof(std::ranlux24) << "\n"
"ranlux48 " << sizeof(std::ranlux48) << "\n"
"knuth_b " << sizeof(std::knuth_b) << "\n"
<< std::flush;
}
@yohhoy
Copy link
Author

yohhoy commented Dec 21, 2013

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