OpenCL code samples


I am a graduate student researching computer architecture. I am looking for OpenCL code samples. I am very happy with the CUDA code samples which come with the SDK and I am looking for a similar set of benchmarks for OpenCL.

Thank you,

And use google as well :) google: “opencl pdf sample vector”


Hi Eyalhir74,

The PDF you sent me only had one kernel. I am looking for code samples of multiple kernels.


AFAIK, there isn’t an OpenCL compiler available from nVidia yet (unless it is only available to registered developers). I’m sure that when the CUDA toolkit comes out with OpenCL support (whichever version that may be), there will be OpenCL examples available in the SDK. In fact, I would bet that most of the existing samples will be rewritten in both OpenCL and DirectX 11 so that you can compare/contrast each sample across the three platforms.

The OpenCL Forum FAQ describes a Beta program: .
Although this FAQ posting doesn’t explicitly mention code samples or an OpenCL SDK, the Beta can be expected to include OpenCL SDK samples similar to those in the present CUDA SDK.

Today’s press release provides a bit more specific information on an OpenCL SDK also:…70477.html?.v=1


Note that the SDK is not a set of benchmarks. Samples are written to be educational, illustrating a particular technique or approach. As such, most of the samples are not highly-tuned implementations.