
There was a missing include in the cabal file. fixed...
On Mon, Aug 17, 2009 at 7:49 PM, Jeff Heard
All, I've released a raw binding to the OpenCL platform on Hackage. The main differences between it and the C bindings are that constants have been replaced by newtypes for type safety reasons, void-essential functions that return a token errorcode return a Maybe ErrorCode, and functions that return a handle/ptr and return an error-code through an out-parameter return instead an Either ErrorCode a. Modules are grouped roughly by the section in which they appear in the standard.
I'm working on an OpenCL binding that is a little more "cooked" as well as a high-level OpenCL binding.
OpenCL is a platform for single-host heterogenous, data-parallel computing that follows roughly the OpenGL and OpenAL conventions for how the library is architected. It will be available by default in the next version of Apple's OS-X, and there are drivers for AMD Opteron/Athlons and nVidia CUDA-based graphics cards.
The basic procedure behind running an OpenCL program is:
1. get a list of platforms 2. choose a device on the platform that fits your needs 3. create a context for the platform and the device 4. compile a program and "kernels" written in OpenCL/C 5. create memory buffer objects. 6. execute kernels on the memory buffer objects. 7. rinse hands, repeat.
Obviously this is not very functional, but we can't get there without a raw binding. Data Parallel computing is somewhere Haskell is excelling; hopefully this will generate some interest in creating a DPH binding to OpenCL's C99-based language, OpenCL/C.