2
#include "dynamiclib.h"
10
// 0 means no opencl, 1 means opencl
15
const char *libname = "OpenCL.dll";
17
const char *libname = "libOpenCL.so";
20
if((ret = loadLib(libname))) {
21
if(ret == -3) // No OpenCL
29
// TODO: optimize by loading all functions here?
39
// Windows-specific DLL code
40
#if defined _WIN32 && defined CLRUN_DYNAMICLIB
41
HINSTANCE g_hInstance;
43
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
44
DWORD dwReason, // reason called
45
LPVOID lpvReserved) // reserved
49
case DLL_PROCESS_ATTACH:
52
case DLL_PROCESS_DETACH:
58
g_hInstance = hinstDLL;