Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

yohhoy commented Dec 21, 2013

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