Skip to content

Concat and split operations #277

Open
@clarfonthey

Description

@clarfonthey

I've recently found myself coding up shorthand methods for operations like:

fn concat(lhs: f64x4, rhs: f64x4) -> f64x8;
fn split(val: f64x8) -> (f64x4, f64x4);

which are shorthands for their various swizzle representations. I tried messing around with the code for the crate to make these work but got stuck with dependencies on generic_const_exprs and couldn't find a way to make it work.

Since the simd_swizzle macro can be a bit overwhelming, it would be nice to have more shorthands like these, but I'm not sure exactly how it would fit within the existing design plans, so, I figured I'd just start a discussion here.

One big problem with these methods under the existing, general implementation is checking that a size is actually supported: for example, f64x16 doesn't exist but f32x16 does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: a feature request, i.e. not implemented / a PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions