Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vc::InterleavedMemoryWrapper is missing in std::simd #12

Open
dimula73 opened this issue Nov 1, 2019 · 0 comments
Open

Vc::InterleavedMemoryWrapper is missing in std::simd #12

dimula73 opened this issue Nov 1, 2019 · 0 comments

Comments

@dimula73
Copy link

dimula73 commented Nov 1, 2019

Usecase

We have pixel data is R1G1B1A1R2G2B2A2... format. To make compositing we need to deinterleave them into R1R2R3..., G1G2G3..., B1B2B3..., A1A2A3... format.

Implementation in Vc and std-simd

In Vc library we could use Vc::InterleavedMemoryWrapper to achieve this goal. std-simd doesn't provide any efficient solution for the task. We could use generator constructor for it, but it doesn't seem to generate what we want:

Old version with Vc::IntterleavedMemoryWrapper:
https://godbolt.org/z/fEQ3s1

Generator syntax with std-simd:
https://godbolt.org/z/pUtMXm

You can see that generator-based version compiler generates more than twice more instructions. That is really suboptimal

PS:
I think this issue may be somewhat related: VcDevel/std-simd#4

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

No branches or pull requests

1 participant