Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I'm trying to do an algorithm which uses SSE2+SSE3 functions. How do I go about to actually compile REF + SSE + SSE2 + SSE3 variants of the algorithm?
My hunch is that I somehow via includes direct the compiler which set of instructions to use, like (pseudo code):
// Compile for REF
#define myalgorithm myalgorithm_REF
// Compile for SSE
#define myalgorithm myalgorithm_SSE
then use cpuid to map a function pointer at run-time to the correct version.
Thing is that I don't know. An example project would be nice to have.