有趣的是它在游戏和其他软件中的工作原理。
更准确地说,我正在寻求一个解决方案C++。
就像是:
if AMX available -> Use AMX version of the math library
else if AVX-512 available -> Use AVX-512 version of the math library
else if AVX-256 available -> Use AVX-256 version of the math library
etc.
Run Code Online (Sandbox Code Playgroud)
我的基本想法是在不同的 DLL 中编译库并在运行时交换它们,但这对我来说似乎不是最好的解决方案。