}
// what do I need to read ?
MPI_Offset totreads = 0;
- for (auto const& chunk : chunks) {
- if (chunk.second < my_chunk_start)
+ for (auto const& [chunk_start, chunk_end] : chunks) {
+ if (chunk_end < my_chunk_start)
continue;
- else if (chunk.first > my_chunk_end)
+ else if (chunk_start > my_chunk_end)
continue;
else
- totreads += (std::min(chunk.second, my_chunk_end - 1) - std::max(chunk.first, my_chunk_start));
+ totreads += (std::min(chunk_end, my_chunk_end - 1) - std::max(chunk_start, my_chunk_start));
}
XBT_CDEBUG(smpi_pmpi, "will have to access %lld from my chunk", totreads);