I have recently picked up an interest in SIMD optimization after wanting to program again in C++ after a while of not doing so. Please, be descriptive as I am still a beginner with SIMD instructions.
My question is : is it possible to compile one cross-platform executable in C++ that support a variety of SIMD instruction sets and that picks in real time the best instruction set to use? Best in terms of performance, usually most recent instruction sets are better.
Example : I compile a game on Windows 10 with an i7-7700K and put it on Steam. Distinct users highly probably have different CPUs that support different SIMD instruction sets. When launching the game, the best SIMD instruction set is detected and used.
Naturally, I would have to adapt my code and support a few hand selected SIMD instruction sets.