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

Documentation Typ-o and Functionality Question #135

Open
beepy0 opened this issue Aug 6, 2019 · 2 comments
Open

Documentation Typ-o and Functionality Question #135

beepy0 opened this issue Aug 6, 2019 · 2 comments

Comments

@beepy0
Copy link

beepy0 commented Aug 6, 2019

Hello,

I have been using libsimdpp for a week now and it is really easy to use once you do a little practice, so thanks a ton from somebody who hasn't done any code vectorization before!

Problem

I have found a small issue with documentation versions <=2.2-dev:
The insert function is named extract in the documentation, I think it was copied over from the other function. http://p12tic.github.io/libsimdpp/v2.2-dev/libsimdpp/w/misc/insert.html


I also have a problem with my code and wondered if it's good to ask here directly in hopes somebody knows how to address such cases, or ask the creator directly per email?
In any case, I am receiving calculated hash bucket-indices for an array in packs of 16 (SIMD) and also the respective values that need to go into these buckets in another SIMD register - now the issue is, that in order to put all those values into the hashed buckets, I need to address the buckets via the indices from the first register, but so far I haven't found a SIMD way to do this, so I am forced to iterate over the indices, call-in the specific buckets and then put the data in them.
The only hack I though of was to call the buckets iteratively, store their current values in an SIMD-array, SIMD-add all those values with the new values, and them iteratively place those back in the array, but this resulted in worse runtime than just looping the old-fashioned way. Any ideas? Thank you in advance.

@p12tic
Copy link
Owner

p12tic commented Aug 7, 2019

Thanks for the documentation bug report.

As for your question, you can shuffle elements in a SIMD vector by index by using permute_bytes16 or shuffle_bytes16 functions.

@beepy0
Copy link
Author

beepy0 commented Aug 7, 2019

Thank you for the answer. As discussed afterwards, my question has been cleared.

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

2 participants