p12tic/libsimdpp

Documentation Typ-o and Functionality Question

beepy0 opened this issue · 2 comments

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.

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.

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