Skip to content

Commit

Permalink
Improve second "for" cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilytric committed Sep 6, 2021
1 parent 5e37167 commit 8e176b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/usm/usm_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,7 @@ struct test {
// initialized 'src_arr' will be copied to 'dst_arr' and the test
// will fail during validation. Reverse order is used to increase
// probability of data race.
for (size_t i = numEvents; i > 0; --i) {
const size_t idx = i - 1;
for (size_t i = numEvents - 1; i + 1 > 0; --i) {
gens[idx].copy_arrays(parent);
}
}
Expand Down

0 comments on commit 8e176b5

Please sign in to comment.