I tried copying C:\links\INTELOCLSDKROOT\bin\icd\x64\OpenCL.dll, to C:\Windows\system32\OpenCL.dll
And I could not get that to work.
Most of the system depends on the existing openCL.dll. System would not Init OpenCL
there are 3 platforms on my System
Intel® OpenCL, accessed by C:\Windows\system32\OpenCL.dll
NVIDIA CUDA accessed by C:\Windows\system32\OpenCL.dll
Experimental OpenCL 2.0 CPU Only Platform, (need to use C:\links\INTELOCLSDKROOT\bin\icd\x64\OpenCL.dll to access this, or start getting unsupported method errors )
hence, needed to work out how to load C:\links\INTELOCLSDKROOT\bin\icd\x64\OpenCL.dll
I brought a book on JNI., and started studying your c++ code
Eventually, I realized where you where you were loading the libary from , and how to specify a different library
what confused me, was that your dll does not depend on opencl.dll (according to the output from Dependency Walker (depends.exe) Home Page ),
I was expecting to see
c:\work3\opencl\mathfuncsdll_soln\mathfuncsdll\x64\debug\MATHFUNCSDLL.DLL (this was a DLL that I wrote)
c:\windows\system32\OPENCL.DLL
c:\windows\system32\KERNEL32.DLL
c:\windows\system32\NTDLL.DLL
c:\windows\system32\ADVAPI32.DLL
but in your DLL
c:\opencl\java\jocl-0.2.0-rc-bin\JOCL_0_2_0-WINDOWS-X86.DLL (does not depend directly on OPENCL.DLL)
c:\windows\system32\KERNEL32.DLL
c:\windows\system32\API-MS-WIN-CORE-RTLSUPPORT-L1-1-0.DLL
c:\windows\system32\NTDLL.DLL
c:\windows\system32\KERNELBASE.DLL
So, I was not sure how you implemented it, but had to study JNI, to work this out.
Anyway, your DLL works with C:\links\INTELOCLSDKROOT\bin\icd\x64\OpenCL.dll, and I can access Open Cl 2.0 functions
(as long as I use the JNI method,
implementationName=“C:\links\INTELOCLSDKROOT\bin\icd\x64\OpenCL.dll”;
CL.initNativeLibrary(implementationName);
)
thanks