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