Easton Man's Channel
01:48 · May 23, 2025 · Fri
Daniel Lemire's blog
Dividing an array into fair sized chunks
Telegraph
|
source
Telegraph
Dividing an array into fair sized chunks
Suppose that you have an array of N elements and you want to divide it into M chunks. It is a common task when trying to spread N units of work over M threads, for example. You want chunks to be all the same size, plus or minus one element (fair sized). It…
Home
Powered by
BroadcastChannel
&
Sepia