Created
February 11, 2017 21:38
-
-
Save brakmic/848e59316ff80d322907b1e48d48592c to your computer and use it in GitHub Desktop.
This file contains 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
void Process(thrill::Context& ctx) { | |
std::default_random_engine rng(std::random_device { } ()); | |
std::uniform_real_distribution<double> dist(0.0, 1000.0); | |
// generate 100 random points using uniform distribution | |
DIA<Point> points = | |
Generate( | |
ctx, /* size */ 100, | |
[&](const size_t& /* index */) { | |
return Point { dist(rng), dist(rng) }; | |
}) | |
.Cache(); | |
// print out the points | |
points.Print("points"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment