OpenCL Frontend

There seems to be some interest these days in OpenCL. However for some
projects, a issue they face to adopting OpenCL is requirements of
maintaining two source trees: one for normal C code (for use on
systems without OpenCL support or poor OpenCL performance) and another
for OpenCL.

I am interested in using LLVM to create a OpenCL frontend for
multicore CPUs. Now that the spec is out, we have a pattern to follow.
Does anyone have any interest in this?

Timothy

Yes, we started implementing OpenCL on top of gallium using LLVM and Clang.
We're planning to publish a public repository in the next week or so.

z

Awesome, is the development of this being tracked somewhere? And is
there a way I can get involved?

Timothy

I'm still not very clear about this "OpenCL" concept. What will your
project provide? Does it mean that we can write code in this language, and
run it on any multi-core machines? I'm also very interested in this work.

It's the same as CUDA from Nvidia, but standardized and not limited to GPU.
You write a task (using the C subset provided by OpenCL), and then, you ask OpenCL to execute it on the what it found (CPU, GPU, DSP, other processing unit).
There is a sample code on wikipedia:

And you can also have a look at the official OpenCL web site (OpenCL Overview - The Khronos Group Inc). There is a slideshow that present it.

http://www.khronos.org/developers/library/overview/opencl_overview.pdf

Yes, I have read those documents. What I'm wondering is that how it can
support all these devices. I have experience programming with CUDA, so there should be some compilers that compile the OpenCL code into
CUDA, if it is chosen?