Open eithun opened 5 years ago
There's not currently code to do that, but I'd be happy to consider a patch if it's sufficiently clean. A particular problem is that images are often 2D.
Yes, this functionally would be great! I'd like to do "image things" but also use the reduction algorithms, which only work for arrays.
Is there any way I can accomplish this sort of task using the existing framework? For example, I've tried converting an image to an array by using the underlying buffer, but I haven't been successful.
Yes, I can see not-too-invasive ways in which the current code could be generalized to that setting. In terms of "the underlying buffer" of an image, I'm not sure there is such a thing.
How can I perform a reduction on an Image object? The module (https://documen.tician.de/pyopencl/algorithm.html?highlight=reduction#pyopencl.reduction.ReductionKernel) seems to only support arrays being passed to kernel function.