显卡厂商有优化方案。以下变量是从程序中导出的,程序会在独立显卡上执行。对于新版bcc编译器编译的程序,导出的变量带有下划线前缀,-vu
不支持参数。我不知道如何解决这个问题。
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
// The following line is to favor the high performance NVIDIA GPU if there are multiple GPUs
// Has to be .exe module to be correctly detected.
extern "C" __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// And the AMD equivalent
// Also has to be .exe module to be correctly detected.
extern "C" __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 0x00000001;
bcc32 旧版本
bcc32c 新版本