Commit 6fc3f195 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

work in progress

parent de479d9a
...@@ -96,15 +96,15 @@ struct rand_uniform ...@@ -96,15 +96,15 @@ struct rand_uniform
std::uniform_real_distribution<> dis(0.0, 1.0); std::uniform_real_distribution<> dis(0.0, 1.0);
size_t elts(dyn_out.computed_shape.elements()); size_t elts(dyn_out.computed_shape.elements());
// Use of our visitor and par_for replaces a call like // Use of our visitor and par_for replaces a call like
std::vector<float> rand_samples(sample_size); // std::vector<float> rand_samples(sample_size);
std::generate(rand_samples.begin(), rand_samples.end(), [&]() { return dis(gen); }); // std::generate(rand_samples.begin(), rand_samples.end(), [&]() { return dis(gen); });
// result.visit([&](auto output) { result.visit([&](auto output) {
// par_for(elts, [&](auto i) { par_for(elts, [&](auto i) {
// output[i] = dis(gen); output[i] = dis(gen);
// // output[i] = rand_samples[i]; // output[i] = rand_samples[i];
// }); });
// }); });
return result; return result;
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment