kamping-site / kamping

KaMPIng: (Near) zero-overhead MPI wrapper for modern C++
https://kamping-site.github.io/kamping/
GNU Lesser General Public License v3.0
27 stars 0 forks source link

Custom Resize Policy #566

Closed mschimek closed 1 year ago

mschimek commented 1 year ago

This PR introduces a BufferResizePolicy to the DataBuffer class, allowing the user to specify how a given buffer (recv_buf, [send/recv]_displs_out, recv_counts_out, send_recv_buf) should be resized by kamping.

Currently only alltoall() and alltoallv() are changed such that thez respect the selected ResizePolicy.

Furthermore, the resizing behaviour for allltoallv is corrected when the user supplies recv_displs. In such cases, the required size is now computed as $\max_i(\mathrm{recv\_displs}[i] + \mathrm{recv\_counts}[i])$