JuliaFolds2 / ChunkSplitters.jl

Simple chunk splitters for parallel loop executions
MIT License
40 stars 5 forks source link

Implement `size` option for `:scatter` chunks. #28

Open lmiq opened 6 months ago

lmiq commented 6 months ago

This is missing from the feature added in 2.3.0.

Options are:

size = 2

input [1, 2, 3, 4, 5, 6, 7]

output [[1, 7], [2, 6], [3, 5], [4]]

or

output: [[1,4], [2,5], [3,6], [7]]
mkoculak commented 5 months ago

Just wanted to chime in that I also found myself needing this combination for organizing elements into a grid. For that purpose the second option is the correct one when thinking about is as rows/cols.