Khronos.org Message Boards

Public discussions about the Khronos Dynamic Media APIs
It is currently Tue Sep 07, 2010 2:03 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 91 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
Author Message
 Post subject: OpenCL C++ Bindings
PostPosted: Thu Mar 12, 2009 2:46 am 
Offline

Joined: Thu Sep 18, 2003 10:01 pm
Posts: 49
Location: Silicon Valley
Some members of the OpenCL Working Group have developed an experimental set of C++ bindings to OpenCL 1.0. The bindings have been posted to the OpenCL Registry. Feedback on the bindings should ideally be reported through Bugzilla, as described in the Registry, but can also be posted in this thread.

_________________
Jon Leech
EGL & OpenGL Specification Editor / OpenGL ARB Ecosystem TSG Chair / Khronos API Registrar


Top
 Profile  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Thu Apr 02, 2009 9:24 am 
Offline

Joined: Thu Apr 02, 2009 9:04 am
Posts: 1
I'm Mac OS user (Intel Core Duo2 + NVIDIA GeForce 9400M ), and I understand Snow Leopard will include OpenCL. I browsed the OpenCL overview brochure, but perhaps an experienced person could give me an idea of whether OpenCL will have any benefit for me. I do mainly numeric computation with C++. A lot of vectorized operations (STL) and cmath.

Is OpenCL relevant for my line of work?
What efficiency gains can I expect (x2, x10)?
What would be the best way to learn OpenCL?


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Thu Jun 11, 2009 8:37 pm 
Offline

Joined: Thu Jun 11, 2009 8:20 pm
Posts: 1
The file cl.hpp that is on the official site contains bindings for the revision 33; do you have updated one for newer revisions? (namely 48?)


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Fri Jun 12, 2009 2:01 pm 
Offline

Joined: Thu Sep 18, 2003 10:01 pm
Posts: 49
Location: Silicon Valley
pirxthepilot wrote:
The file cl.hpp that is on the official site contains bindings for the revision 33; do you have updated one for newer revisions? (namely 48?)


I've asked about updates - but do remember that these are not official Khronos products.

_________________
Jon Leech
EGL & OpenGL Specification Editor / OpenGL ARB Ecosystem TSG Chair / Khronos API Registrar


Top
 Profile  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Fri Jun 12, 2009 2:09 pm 
Offline

Joined: Tue Apr 14, 2009 8:48 am
Posts: 27
I have an updated version for rev .43 and i'm planning to update to .48 over the next few days. As soon as it is done I request for it to be posted on along side the updated headers.


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Sat Jun 13, 2009 3:47 am 
Offline

Joined: Fri May 29, 2009 7:47 am
Posts: 11
e_r wrote:
I'm Mac OS user (Intel Core Duo2 + NVIDIA GeForce 9400M ), and I understand Snow Leopard will include OpenCL. I browsed the OpenCL overview brochure, but perhaps an experienced person could give me an idea of whether OpenCL will have any benefit for me. I do mainly numeric computation with C++. A lot of vectorized operations (STL) and cmath.

Is OpenCL relevant for my line of work?
What efficiency gains can I expect (x2, x10)?
What would be the best way to learn OpenCL?


1) yes
2) probably more than x10 if the problem is well suited. this is usually the case if you have a lot of vector operations and coalesced memory access. but a concretely answer to this question cannot be given without knowing the problem.
3) read the opencl reference guide and the nvidia cuda informations.

...) please open a new thread next time because this is off topic!


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Mon Jun 22, 2009 8:18 pm 
Offline

Joined: Tue Apr 14, 2009 8:48 am
Posts: 27
Jon,

I have posted an updated C++ bindings header for 1.0 rev 43 and would be greatful if you could post it to the website.

Regards,

Ben


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Tue Jun 23, 2009 11:53 am 
Offline

Joined: Tue Jun 23, 2009 11:50 am
Posts: 2
bgaster wrote:
I have posted an updated C++ bindings header for 1.0 rev 43

Where we can find it? I want to use the C++ binding, but current version of cl.hpp seems to be incompatible with cl.h


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Tue Jun 23, 2009 7:48 pm 
Offline

Joined: Tue Apr 14, 2009 8:48 am
Posts: 27
Sorry for the delay but I forgot to build the corrsponding documentation and this is done now and hopefully the updated bindings and documentation should be up by tommorrow.


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Tue Jun 23, 2009 8:34 pm 
Offline

Joined: Thu Sep 18, 2003 10:01 pm
Posts: 49
Location: Silicon Valley
cuder wrote:
Where we can find it?


Benedict's updated C++ bindings are linked from the OpenCL Registry now.

_________________
Jon Leech
EGL & OpenGL Specification Editor / OpenGL ARB Ecosystem TSG Chair / Khronos API Registrar


Top
 Profile  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Wed Jun 24, 2009 7:42 am 
Offline

Joined: Tue Jun 23, 2009 11:50 am
Posts: 2
Thanks! But one note: ::clEnqueueAcquireExternalObjects isn't found nowhere.


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Tue Jul 07, 2009 3:37 pm 
Offline

Joined: Tue Apr 14, 2009 8:48 am
Posts: 27
Sorry for the delay but I have updated the C++ bindings:

http://www.khronos.org/registry/cl/

This includes removing the call to ::clEnqueueAcquireExternalObjects but also have added two new types cl::vector and cl:string that are alternatives too STL versions. See the documentation for details.

Ben


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Wed Jul 29, 2009 3:07 pm 
Offline

Joined: Tue Apr 14, 2009 8:48 am
Posts: 27
A new verison of the C++ bindings has been uploaded that fixes a bug introduced with the cl::vector class and its use with NDRange. It can be found here:

http://www.khronos.org/registry/cl/


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Mon Aug 17, 2009 2:41 am 
Offline

Joined: Mon Aug 17, 2009 2:31 am
Posts: 1
I've been trying to compile the C++ bindings files with no success. Has anyone done this successfully on an intel iMac osx 10.5.8. I get the following errors:
cl.h:452: error: expected initializer before 'AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER'
.....
....

any ideas?


Top
 Profile E-mail  
 
 Post subject: Re: OpenCL C++ Bindings
PostPosted: Fri Aug 21, 2009 4:46 am 
Offline

Joined: Fri Aug 21, 2009 4:08 am
Posts: 3
When handling multiple devices it would be handy to be able to maintain a vector of kernel functors, where each functor is associated with a command queue:
Code:
std::vector<cl::KernelFunctor> kernelFunctors;
for (int d = 0 ; d < commandQueues.size() ; d++)
{
    kernelFunctors.push_back(kernel.bind(commandQueues[d], globalNDRange, localNDRange));
}

Any ideas for how to implement something like this, given that this won't work without being able to copy KernelFunctors?


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 91 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group