We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54fd45f commit 89db9d8Copy full SHA for 89db9d8
source/glkernel/include/glkernel/sample.hpp
@@ -295,11 +295,9 @@ void n_rooks(tkernel<glm::tvec2<T, P>> & kernel)
295
std::uniform_real_distribution<> jitter_dist(0.0, stratum_size);
296
297
// create pool of column indices and shuffle it
298
- std::vector<int> columnIndices;
299
- for (int k = 0; k < static_cast<int>(kernel.size()); ++k)
300
- {
301
- columnIndices.push_back(k);
302
- }
+ std::vector<int> columnIndices = std::vector<int>(kernel.size());
+ std::iota(columnIndices.begin(), columnIndices.end(), 0);
+
303
std::random_shuffle(columnIndices.begin(), columnIndices.end());
304
305
// use columnIndices to shuffle samples in y-direction
0 commit comments