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
-
-
[2/4] Put the code in a DLL, and have one version of the DLL for every architecture, then load the appropriate one at startup.
-
[3/4] Put the code in a separate file and compile that file n times, one for each arch, with a macro that changes the names of the function so you can pick which one you call.
- 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.