Skip to content

Add splat_lane#282

Closed
calebzulawski wants to merge 1 commit intomasterfrom
feature/broadcast
Closed

Add splat_lane#282
calebzulawski wants to merge 1 commit intomasterfrom
feature/broadcast

Conversation

@calebzulawski
Copy link
Member

Like splat, but from an existing vector.

Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this makes that much sense as a public method (although I'm not sure it's not worth having, it just seems a little specific of a shuffle), but I do think it's worth using inside splat if it's needed to fix https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Very.20bad.20.60u16x8.3A.3Asplat.60.20codegen.20on.20x86_64

Copy link
Member

@programmerjake programmerjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk that we should have splat_lane as a public API, considering how easy it is to do:

pub fn splat_lane_0(v: u16x8) -> u16x8
{
    simd_swizzle!(v, [0; 8])
}

other than that, lgtm.

@calebzulawski
Copy link
Member Author

I suppose it is pretty trivial with the macro, agreed. Trivial enough to add in the future if requested

@calebzulawski calebzulawski deleted the feature/broadcast branch October 17, 2022 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants