Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduction algorithms on Image objects #290

Open
eithun opened this issue Jun 14, 2019 · 4 comments
Open

Reduction algorithms on Image objects #290

eithun opened this issue Jun 14, 2019 · 4 comments

Comments

@eithun
Copy link

eithun commented Jun 14, 2019

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.

@inducer
Copy link
Owner

inducer commented Jun 14, 2019

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.

@eithun
Copy link
Author

eithun commented Jun 14, 2019

Yes, this functionally would be great! I'd like to do "image things" but also use the reduction algorithms, which only work for arrays.

@eithun
Copy link
Author

eithun commented Jun 14, 2019

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.

@inducer
Copy link
Owner

inducer commented Jun 14, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants