I try create some DLL based opencl for working with MATLAB. Function clCreateContext can't create context when it called from DLL used from MATLAB (I try a function clCreateContextFromType too). Return error -6 (CL_OUT_OF_HOST_MEMORY), but at this moment task manager show more than 1.5 GB memory is free.
It is strange but if I use this DLL with Intel platform from VisualStudio or from Excel all is working.
This DLL is working with MATLAB when I use another platform (AMD on the same machine or Nvidia on another machine).
The system is CPU Intel Core i5 660, RAM 4 GB, Windows 7 64-bit, MATLAB 8.3 64 bit, Intel SDK 18.104.22.168, Intel OpenCL runtime for CPU 22.214.171.124 (I check this on runtime 126.96.36.199 doesn't work too), AMD APP SDK 2.9.599.381, Nvidia version I can't remember (I think something latest).
I attached little project for VisualStudio 2013. This project write error code in windows application event log. In archive also include matlab.m file.