xo-umbrella2/xo-randomgen/example/ex1/ex1.cpp
Roland Conybeare 6a991f657c git subrepo clone (merge) git@github.com:Rconybea/xo-randomgen.git xo-randomgen
subrepo:
  subdir:   "xo-randomgen"
  merged:   "b9b7650d"
upstream:
  origin:   "git@github.com:Rconybea/xo-randomgen.git"
  branch:   "main"
  commit:   "b9b7650d"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 21:32:39 -04:00

24 lines
452 B
C++

/* @file ex1.cpp */
#include "xo/randomgen/xoshiro256.hpp"
#include <algorithm>
#include <iostream>
using namespace xo;
using namespace xo::rng;
int
main(int argc, char ** argv) {
xoshiro256ss rng{123456789};
std::array<std::uint64_t, 20> v;
std::generate(v.begin(), v.end(), rng);
for (std::uint64_t i=0; i<v.size(); ++i)
std::cout << "v[" << i << "]: " << v[i] << std::endl;
return 0;
} /*main*/
/* end ex1.cpp */