KernelAbstractions.jl
KernelAbstractions.jl copied to clipboard
Suggestion: Better ergonomics around collecting multiple kernels
Hey there, I'm really enjoying using KernelAbstractions so far!
Doing Multievents feels clunky, from looking at the source I've used it as follows:
events = []
for layer in 1:layers
push!(events, kernel_func!(cuda_grids, layer))
end
wait(MultiEvent(Tuple(events)))
Perhaps I missed something, but a suggestion would be to make wait accept an Array{Event,1}?
Under the hood, I understand it's using a tuple. Is there any limitation to the way that wait is implemented such that it couldn't accept an Array?
For instance:
events = [box_blur!(model.grids, layer) for layer in 1:length(model.agent_configs)]
wait(events)
Thanks, Tom