Allow callers to pass in output buffers
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 979
- Forks
- 181
- Avg merge
- 5m
- Merged PRs (30d)
- 4
Description
I'm finding myself wanting to scale/blur/whatever images into an ndarray Array3. But imageproc functions all allocate their own output, which is suboptimal in many cases, for example when:
- the user wants to get outputs into some multidimensional array
- the same operation is performed repeatedly and output buffers could be reused instead of de- and reallocating in a loop
- the user needs the output in some special buffer handed to them by the kernel or a device like a GPU
I'm not sure adding do_thing_into functions for every function in the library is the best way to do this and using inout parameters is cumbersome compared to the current default, so some more generic way to make operations (somewhat) agnostic to where they shove their output might be appropriate.
I'm willing to put some time into this, but given that this would break literally every API in the crate I wanted to ask for some opinions before maybe investigating how this could be done.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by reviewing the existing imageproc operations that allocate outputs and the 33-comment discussion; done requires an agreed generic approach for caller-provided buffers without proceeding from an unresolved API design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-vision, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100