4 ms·
> Or do they somehow adapt to the operations supported by the user's CPU? This is called runtime dispatch. You can do it manually or use a library, like Google
by sorenjan 2y ago
> Or do they somehow adapt to the operations supported by the user's CPU?
This is called runtime dispatch. You can do it manually or use a library, like Google Highway. GCC supports multiversioning where you write separate versions of a function and the right one is selected at runtime.
https://github.com/google/highway https://github.com/google/highway
https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Function-Multiversioning.html https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Function-Multiv...