rust-lang / rust-lang/portable-simd

Consider removing splatting from operator overrides

Open
#196 11 comments 3 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

Removing splatting from operator overloads would make simd more consistent with the rest of Rust where explicit type conversions are basically always needed, it would also greatly simplify our docs.

Because splatting is so common, we could add a global splat function (wouldn't necessarily replace Simd::splat, but would be otherwise identical) and/or a Splat trait such that you could write my_scalar.splat().

Zulip: https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/remove.20splatting.20on.20operators.3F

Related: https://github.com/rust-lang/portable-simd/pull/195#issuecomment-974357869
and: https://github.com/rust-lang/portable-simd/pull/10#issuecomment-701658659

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 with the operator-overload and splatting discussion in this issue, then read the linked Zulip thread and the related comments on PRs #195 and #10. Done means reaching an agreed API decision about removing operator splatting and whether a global splat function or Splat trait is needed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.