Skip to content

Commit 7611029

Browse files
committed
tidy.
1 parent 3cd269a commit 7611029

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/collective/broadcast.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ Result RelayToRoot(Comm const& comm, common::Span<std::int8_t> data, std::int32_
6565
auto rank = comm.Rank();
6666
auto path = TreePathToRoot(root);
6767

68-
for (std::int32_t i = 0; i < static_cast<std::int32_t>(path.size()); ++i) {
69-
auto node = path[i];
68+
for (auto node : path) {
69+
CHECK_GT(node, 0);
7070
auto k = TrailingZeroBits(static_cast<std::uint32_t>(node));
71-
auto parent = node - (1 << k);
71+
auto parent = node - (std::int32_t{1} << k);
7272

7373
if (rank == node) {
7474
auto rc = Success() << [&] {

0 commit comments

Comments
 (0)