dysfun@treehouse.systems ("gaytabase") wrote:
okay so i started thinking about big pext and it's a little tricky.
so let's define the problem. if you have hardware pext support, you will get 64 and 32 bit versions. which are great if those are what you want and a bit shift if you want an arbitrary size. so we want pext for arbitrary size buffers, or big pext.
say we have an array of 64 bit integers, we can do most of the work with 64 bit pexts. this will select all of the relevant bits, but it will organise them all in their original 64 bit chunks. intuitively with some shifting about, we can fix this, but that shifting about is pretty annoying.
but it can get more annoying! i have already got high throughput versions of array pext. i would of course want it to keep up with that so it's really only slightly slower for the same amount of data.
i think it's doable, but it's not immediately obvious how to do all the shifting about without knackering everything.