When a RingField transitions from first to second recompute the do_send and do_recv values.
| 350 | // When a RingField transitions from first to second recompute the |
| 351 | // do_send and do_recv values. |
| 352 | void RingAlg::AdvanceToSecondPass(RingField* rf) { |
| 353 | VLOG(3) << "IncrRingField old value " << rf->DebugString(); |
| 354 | DCHECK(!rf->second_pass); |
| 355 | rf->second_pass = true; |
| 356 | rf->action = RF_INIT; |
| 357 | if (ca_->ChunkBytes(rf->sc_idx) > 0) { |
| 358 | // In pass 1 the send/no-send boundary moves down 1 place. |
| 359 | rf->do_recv = |
| 360 | (rf->rank != ((rf->chunk_idx + (group_size_ - 1)) % group_size_)); |
| 361 | rf->do_send = |
| 362 | (rf->rank != ((rf->chunk_idx + (group_size_ - 2)) % group_size_)); |
| 363 | } |
| 364 | rf->is_final = |
| 365 | (rf->rank == ((rf->chunk_idx + (group_size_ - 2)) % group_size_)); |
| 366 | VLOG(3) << "IncrRingField new value " << rf->DebugString(); |
| 367 | } |
| 368 | |
| 369 | string RingAlg::RingField::DebugString() const { |
| 370 | string rv = strings::StrCat("RingField rank=", rank, " chunk_idx=", chunk_idx, |
nothing calls this directly
no test coverage detected