Skip to content

Commit

Permalink
try loop xchg
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Makovski committed Jan 31, 2025
1 parent 3c97b47 commit 8071f43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labs/memory_bound/mem_order_violation_1/solution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ std::array<uint32_t, 256> computeHistogram(const GrayscaleImage& image) {
++hist[j][image.data[i + j]];
}
}
for (int j = 1; j < CNT; ++j) {
for (int k = 0; k < hist[0].size(); ++k) {
for (int k = 0; k < hist[0].size(); ++k) {
for (int j = 1; j < CNT; ++j) {
hist[0][k] += hist[j][k];
}
}
Expand Down

0 comments on commit 8071f43

Please sign in to comment.