arduano / simdeez

easy simd
MIT License
331 stars 25 forks source link

Is the README example correct for inputs that aren't a multiple of VF32_WIDTH? #2

Closed oconnor663 closed 5 years ago

oconnor663 commented 6 years ago

It looks like it's loading vectors from each input slice without checking whether there are enough elements remaining in the slice. But maybe I missed some detail about how this gets handled?

jackmott commented 6 years ago

you are correct, the example assumes an evenly divisible input length. For now you have to just handle this manually, I've been thinking on utility functions or maybe using iterators to make that easier. If you have ideas let me know!