#include #include #include #include "rand.h" #define BUF_SIZE (16 * 1024 * 1024) int main(int argc, char** argv) { unsigned long long init[4]={0x12345ULL, 0x23456ULL, 0x34567ULL, 0x45678ULL}, length=4; init_by_array64(init, length); uint8_t* buffer = malloc(BUF_SIZE); uint64_t counter = 0; for(;;) { for(uint64_t i = 0; i < BUF_SIZE; i += 8) { uint64_t r = genrand64_int64(); *((uint64_t*) &buffer[i]) = r; } fwrite(buffer, BUF_SIZE, 1, stdout); counter += BUF_SIZE; if((counter & 1073741823) == 0) { fprintf(stderr, "Wrote %lld GiB\n", counter / 1073741824); } } return 0; }