On Fri, 1 Sep 2017 16:57:00 +0800 Xiaoyun Li <xiaoyun...@intel.com> wrote:
> This patch dynamically selects functions of memcpy at run-time based > on CPU flags that current machine supports. This patch uses function > pointers which are bind to the relative functions at constrctor time. > In addition, AVX512 instructions set would be compiled only if users > config it enabled and the compiler supports it. > > Signed-off-by: Xiaoyun Li <xiaoyun...@intel.com> Maybe a less intrusive way would be to build multiple shared libraries, one for each CPU type, then do dynamic binding at startup.