Quick question: How do you tell a C compiler to use an instruction set extension only within specific code blocks, like:
if(processor_has_instruction)
//use instruction
else
//fallback code that won't be optimised to use instruction
Poke: @cmuratori
Or, if it turns out that they effectively share no code (which they well might!), then there's just 3 .h's - meow_aesni, meow_avx2, and meow_avx512, or something like that.
-
-
My suspicion is, for Meow, basically the entire thing will be ASM-like, so probably just one .h file per platform is the best solution, with an example file that shows how to build them all and switch if you so desire.
-
I was thinking more along the lines of: SSE2 - SSE4.2+AES - AVX+AES - Legacy ARM - NEON - NEON+AES. And automatically building and choosing whatever is appropriate.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.