PDA

View Full Version : Templates support



IvanK
08-23-2011, 09:06 AM
Hello,
I am a CUDA/C++ developer and I miss templates support in OpenCL badly, especially the thrust (http://code.google.com/p/thrust/) library. If there were a similar library in OpenCL, I would certainly switch to OpenCL in my projects.

Kallex
08-24-2011, 11:43 AM
Hi,

Do you happen to work with Visual Studio environment? There's a way to template things in generic way in that environment; for any language that is, including OpenCL.


Kalle

oscarbg81
09-18-2011, 01:13 AM
Please post a sample!

Hi,

Do you happen to work with Visual Studio environment? There's a way to template things in generic way in that environment; for any language that is, including OpenCL.


Kalle

kylelutz
04-13-2013, 11:56 AM
Sorry to dig up an old thread but I just stumbled upon it via google.

I've been working on a C++ STL-like library for OpenCL called Boost.Compute. It provides some standard containers (vector<T>, array<T, N>) along with standard algorithms (sort(), transform(), accumulate()).

Source Code: https://github.com/kylelutz/compute
Documentation: http://kylelutz.github.io/compute

Hopefully you (or others) will find this useful.

Cheers,
Kyle

khronos
04-15-2013, 09:53 AM
Posting to an old thread will most likely not get much notice. Please post a new thread with your information. Thanks.