I have some ints in memory, eg I have an UnsafePointer[UInt8] of arbitrary size. I would like to count the number of bits set to 1 with reduce_bit_count.
Can I get somehow a SIMD view inside my data, for example windows of 8 bytes at a time, and then use reduce_bit_count
on that? I tried going through Span but that doesn’t immediately
work.
Or do I need to copy my ints inside a newly created SIMD object?
Or is there a better/different way to look at the problem?
Many thanks!
Marius