Created
July 13, 2016 10:37
-
-
Save andrey-malets/c21bd799b2703a4b4822e525fcec0078 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <cassert> | |
#include <random> | |
#include <unistd.h> | |
int main(int ac, char* av[]) { | |
std::mt19937_64 e; | |
if (ac == 2) { | |
e.seed(std::stoi(av[1])); | |
} | |
while (true) { | |
std::array<std::uint_fast64_t, (2 << 16 >> 3)> output; | |
for (auto& i : output) { | |
i = e(); | |
} | |
auto size = sizeof(output[0]) * output.size(); | |
assert(write(1, output.data(), size) == size); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment