Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Naming shuffle instructions #78

Closed
tlively opened this issue May 15, 2019 · 4 comments
Closed

Naming shuffle instructions #78

tlively opened this issue May 15, 2019 · 4 comments

Comments

@tlively
Copy link
Member

tlively commented May 15, 2019

#71 added a new shuffle instruction but was explicitly merged without consensus on the name of the new instruction or the instruction that PR renamed to v8x16.shuffle2_imm (previously v8x16.shuffle). Now that the instruction is merged into the proposal, we should return to the bikeshed of the names.

In the previous PR I held an informal vote for different parts of the naming schemes: #71 (comment)

At time of writing, these are the results:

  • 3 votes for using permute* and shuffle* as the base names
  • 1 vote for using shuffle1* and shuffle2* as the base names
  • 0 votes for using _dyn as a suffix marking dynamic indices
  • 1 vote for using _vec as a suffix marking dynamic indices
  • 3 votes for not having a suffix to mark dynamic indices

If we went with the most popular results, our two instructions would be named v8x16.permute and v8x16.shuffle_imm. What does everyone think of that?

@tlively
Copy link
Member Author

tlively commented Jun 18, 2019

Bump! With our new stage 2 status and @Honry about to start writing spec tests, it would be good to get the naming squared away. Please give me at least a quick 👍 if you would be fine with v8x16.permute and v8x16.shuffle_imm and a 😕 if you prefer something else.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 18, 2019

The whole point of the names, as opposed to the binary encoding, is clarity. I still find it misleading that v8x16.permute does not perform a permutation. Something like v8x16.shuffle1 and v8x16.shuffle2_imm feel more accurate to me.

@tlively
Copy link
Member Author

tlively commented Jul 3, 2019

We talked about this at the last meeting, and reached a general consensus in the room that swizzle would be a good name for the single-argument version and shuffle for the two-argument version. @gnzlbg does that sound acceptable to you?

@gnzlbg
Copy link
Contributor

gnzlbg commented Jul 4, 2019

Sounds good, swizzle operations take one argument, allow repetition, and is a technical term in computer graphics.

@tlively tlively mentioned this issue Jul 18, 2019
@dtig dtig closed this as completed Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants