Hi Richard, maybe two builds (one with, one without AVX2 etc.) and a wrapper program do the job. The wrapper does nothing more than detecting what is available and starts one or the other binary. Similarly we could put all the application code in two differently builds of a dynamic library and a customer wrapper just loads and pass control to the right one.
First solution is easier but less elegant. Don't ask me how to implement the second one, but 20 years ago I did something like this, guess it is still doable on modern Linux&Windows. Regards, Danilo On 22 Apr 2020 17:27, Richard Shaw wrote: > So LPCNet requires AVX, AVX2, or NEON, but in most Distro's those > instruction sets can not be assumed. There's still hardware being > produced that don't have any of those. > > For instance, in Fedora x86_64, we only assume up to SSE2 because > assuming anything higher would prevent install on some processors > still in production (and may more still in use). > > Between all the architectures on Fedora (x86_64, i686, armv7hl, > aarch64, ppc64le, and s390x) there is only one baseline that meets the > requirements of LCPNet: > > aarch64 because NEON is "baked in". > > There are ways to detect the available instruction sets during runtime: > > https://github.com/google/cpu_features > > But I know I don't have the knowledge how to implement this > dynamically (at run time instead of build time). > > There's also a problem we've briefly discussed before, should we keep > the name LPCNet for our library? From a packaging perspective it's an > issue because someone may want to package the canonical LPCNet: > > https://github.com/mozilla/LPCNet > > And two packages can't have the same name for obvious reasons... > > Thoughts? > > Thanks, > Richard > > > _______________________________________________ > Freetel-codec2 mailing list > Freetel-codec2@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freetel-codec2
_______________________________________________ Freetel-codec2 mailing list Freetel-codec2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freetel-codec2