AdamNiederer / AdamNiederer/faster

No way to process N elements at a time

未关闭
#32 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
1.6k
派生
52
PR 合并指标
30 天内没有已合并 PR

描述

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:

```rust
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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。