ridiculousfish / libdivide

Official git repository for libdivide: optimized integer division
http://libdivide.com
Other
1.1k stars 79 forks source link

Add 16 bit support #75

Closed adbancroft closed 3 years ago

adbancroft commented 3 years ago

Data types & methods for signed & unsigned 16-bit division.

No NEON/AVX/SSE support

ridiculousfish commented 3 years ago

You bet I'll review

adbancroft commented 3 years ago
1. Currently this doesn't compile on ARM because of missing specializations for `NeonVecFor<uint16_t>` and likewise signed. I can repro on both an ARM Mac and an Odroid.  If you have access to an ARM device I'd appreciate a fix since you now understand these macros best; otherwise I can do it.

Should be fixed, or at least compile - I setup cross compilation. However, I have no way to test - could you retest?

2. I wasn't able to successfully run the AVR test following the instructions. Here's the output:

The CI build runs OK, though that is on Windows. Could you try a verbose build? Acitivty bar ->PlatformIO ->Project Tasks -> megaatmega2560_TestFast -> Advanced -> Verbose Build.

ridiculousfish commented 3 years ago

Changes look awesome! Builds and runs cleanly for me on ARM and x86.

I still can't quite get the AVR test to work on my Mac but if it's in CI that's plenty. I think there's a path to get it working with installing simavr and platformio with Homebrew but that's for another day.

Just one minor fix and then please merge. Thanks, 16 bit support is great!