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

No way to process N elements at a time #32

Open
pedrocr opened this issue Apr 2, 2018 · 0 comments
Open

No way to process N elements at a time #32

pedrocr opened this issue Apr 2, 2018 · 0 comments

Comments

@pedrocr
Copy link

pedrocr commented Apr 2, 2018

I've implement a simple image processing benchmark in rust to try out several approaches for use in my crates:

https://github.com/pedrocr/rustc-math-bench

faster looks very interesting so I was trying to add another implementation based on it to this file:

https://github.com/pedrocr/rustc-math-bench/blob/b0e3c047dcdbb2bb0fdcb29eac31f7838f83beab/src/main.rs

It's basically just a color conversion pass where each pixel has 4 values and the result is 3 values (camera space to RGB).

However I can't seem to find a way in faster to iterate over groups of N values. Basically have the ergonomic and SIMD way to do:

for (pixin, pixout) in inb.chunks(4).zip(out.chunks_mut(3)) {

That's a common thing to have to do in graphics processing, processing one buffer with a given number of values per pixel into another with another number. Is this a target use case for faster at all?

Congratulations on a very promising crate either way.

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

1 participant