nemequ/portable-snippets

Runtime CPU feature detection (SSE, AVX, NEON, etc.).

nemequ opened this issue · 1 comments

I have some code for this. Need to clean it up a bit, remove any proprietary bits, and add support for some more architectures (currently it's only x86 and ARM).

Would be great if it also included an ifunc-like mechanism for calling different versions of a function.

Added a "cpu" module a while back for this.

I also added a "once" module to help create ifuncs, but I haven't figured out a way to create a good generic API for dynamically dispatching a function call without relying on something like libffi.