For Erlang, I found this (https://github.com/tonyrog/cl) to be a good choice as it is more complete than other implementations.
My home development machine is Windows 7 64bit -- I prefer CentOS for general development and Mac for general use (I have all three at both work and home), however for some devices and applications I use, I decided to use Windows. Windows is actually very convenient when it comes to odd hardware. Mac -- not supported or some workaround is necessary, and for Linux, too much tinkering is needed which I do not want to spend too much time but focus on actual development.
Anyways, for Tony Rogvall's library, the compiling didn't go well in my environment. After spending several hours, I finally figured it out. Again, this difficulty and steps only apply for my case:
- Windows 7 pro, 64bit.
- Nvidia CUDA 5 SDK installed. (CUDA 5 SDK comes with OpenCL, not a separate SDK)
- H/W: NVidia Quadro 600 and Tesla C2050.
- Erlang R15B02 (erts-5.9.2) 64bit.
- Visual Studio 2010 Pro.
- open cmd
- "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
- git clone https://github.com/tonyrog/cl.git
- set OPENCL_DIR=/PROGRA~1/NVIDIA~2/CUDA/v5.0
update c_src\Makefile, adding "MCL=1"
- rebar compile
Hope this helps someone facing the same problem.
Now it's time to actually explore OpenCL in Erlang!
UPDATE: the author confirmed that Makefile is not used. Therefore step#5 is not necessary.