qimpy.mpi.get_block_slices
- get_block_slices(n_tot, block_size)
Split n_tot tasks into blocks of size block_size. Returns a list of slices for each block. All blocks will have equal size (equal to block_size), except the last one that may be smaller.
- Parameters:
n_tot (int)
block_size (int)
- Return type:
list[slice]