rust-lang / rust-lang/portable-simd

What use a single lane?

Open
#94 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.1k
Forks
108
Avg merge
22h 53m
Merged PRs (30d)
3

Description

This may sound like a very silly issue, but we currently offer the option to do "SIMD" with a single lane. This is... uh...

"Why?" It literally contradicts the meaning of the phrase "SIMD".

Mind, if we offer a fully generic API over all L, yeah, a single lane is valid and only the "zero-lane" is not. So I am not saying we absolutely shouldn't do this per se. And e.g. x86_64 interprets floating point numbers in a way roughly equivalent to "single lane SIMD". However, I would still like examples of practical code that are enabled by this behavior on our part, or else to consider compile-errors on single-lane "vectors".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing single-lane SIMD API and the issue's comment discussion. Determine whether practical code depends on single-lane vectors; done means reaching a clear decision on retaining the behavior or making single-lane vectors fail to compile.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.