WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Allow deriving VectorOrScalar #410

@nazar-pc

Description

@nazar-pc

The trait is unsafe and currently says:

Implementing this trait on non-scalar or non-vector types may break assumptions about other unsafe code, and should not be done.

Fair enough, but not particularly useful for someone who would like to implement it.

It'd be great if there was a way to derive its implementation with a derive macro. Very helpful for new types, structs with two numeric fields, etc. Without this capability things like subgroup_shuffle() currently require substantial boilerplate.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions