target_clones constexpr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Is it possible to have a "if constexpr" inside a __target_clones__ multiversioned function to have certain parts of the function depend on the target? Outside of multiversioned function one normally would use preprocessor defines to query the SIMD support (e.g. __AVX__). But this doesn't work inside target_clones given that preprocessor variables don't depend on the target. __builtin_cpu_supports doesn't work because it isn't constexpr (and is meant for runtime detection). One could extract the target specific part into its own function (using target rather than target_clones attribute) but that doesn't work with different types. Is there some other way to query the target which does work inside a multiversioned function?

Thanks
Roland




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux