rust-lang / rust-lang/portable-simd

Panic-free ops via masking: `{div,rem}_or`

Open
#202 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi, I was wondering if this team is considering the addition of masking arbitrary operations rather than just the gather select?

This is something already available in AVX512 through the kmask registers, though would probably require emulation on other platforms, but it seems like a very useful thing to have if at all possible.

One of the more awesome use cases I've seen for this is with vectorised emulation: https://gamozolabs.github.io/fuzzing/2018/10/14/vectorized_emulation.html which makes heavy use of masking to run / fuzz 8 virtual machines in parallel per core per thread.

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 gather-select masking support described in the issue, then compare the requested arbitrary-operation masking with AVX512 kmask registers and the linked vectorized-emulation example. Done would require an agreed API and cross-platform behavior for panic-free masked division and remainder operations.

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.