Last active
April 13, 2016 08:25
-
-
Save usagi/a0832081ed596bdbaab9cc23a3cb5c39 to your computer and use it in GitHub Desktop.
Optimus搭載機でハイパフォーマンスGPUを自動的に使用するアプリの作り方 ref: http://qiita.com/usagi/items/e409322eb6d7e96d7e2f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _WIN32 | |
#include <windows.h> | |
#endif | |
#include <cstdint> | |
extern "C" | |
{ | |
#ifdef _WIN32 | |
__declspec( dllexport ) | |
DWORD | |
#else | |
std::uint32_t | |
#endif | |
NvOptimusEnablement = 0x00000001; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nm bin/my_app.exe | grep NvOp | |
00000000007f2210 D NvOptimusEnablement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment