I already had a similar example that calculates the bitwise prefix sum of a byte and stores the result vector in the nibbles of a 32 bit word. But this has been posited to be more useful. Idk. ;) In case you don't know what this is about:https://github.com/riscv/riscv-bitmanip …
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Posts like this make me miss sharing a spacetime coordinate with you, always interesting. :-)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I would use a 256 entry lookup table for that :-)
-
What would you do for 16 bit -> 64 bit? (I know, same table and pcnt+shift+or to combine the results would work. But that's sooo boring. ;) And also probably approaching the point where my solution is always faster, depending on speed of your bext implementation.)
- Show replies
New conversation -
-
-
you can also replace your two shifts/or pairs with a mul with constant 0x0f I guess.
-
Oh, yes, of course! Thanks. I think I will do that.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.