Commit 9017433d authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Shorten loop.

parent 16c239c4
......@@ -116,11 +116,8 @@ static void exchange_idxlists(struct Xt_com_list **src_intersections,
pack_sizes, 1, MPI_INT, comm), comm);
int *restrict displ = pack_sizes + comm_size;
displ[0] = 0;
unsigned recv_buffer_size = (unsigned)pack_sizes[0];
unsigned size_overflow = 0;
for (size_t i = 1; i < (size_t)comm_size; ++i) {
unsigned recv_buffer_size = 0, size_overflow = 0;
for (size_t i = 0; i < (size_t)comm_size; ++i) {
displ[i] = (int)recv_buffer_size;
recv_buffer_size += (unsigned)pack_sizes[i];
size_overflow |= recv_buffer_size & (1U << (sizeof(int) * CHAR_BIT - 1));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment