Add as_array to SimdValue?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- performance
Research direction
Start at the SimdValue trait and inspect its implementations, especially AutoSimd<T; N>, primitive types, num_complex::Complex, std::simd-based values, and wide-based values. Compare how each currently exposes its backing array or reference, then verify that generic code can call the new trait operation for every implementation and that the existing project checks pass.
Written by the indexing model from the issue text.
Description
Often it would be convenient to be able to cast the entire SIMD value to an array reference instead of extracting lanes one by one, in a generic code over any SimdValue.
As far as I can tell, all implementations of SimdValue should be able to support this - AutoSimd<[T; N]> has array easily accessed via .0, primitives can be casted via std::slice::from_ref, num_complex::Complex has repr(C) compatible with [T; 2], std::simd-based implementation has its own as_array, and wide-based implementation has as_array_ref.
With that in mind, can we add as_array to SimdValue trait itself to make writing generic code easier?
- Dominant language
- Rust
- Stars
- 348
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from dimforge/simba
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100