Page 2 of 10 FirstFirst 123456 ... LastLast
Results 11 to 20 of 100

Thread: OpenCL C++ Bindings

  1. #11
    Junior Member
    Join Date
    Jun 2009
    Posts
    2

    Re: OpenCL C++ Bindings

    Thanks! But one note: ::clEnqueueAcquireExternalObjects isn't found nowhere.

  2. #12
    Junior Member
    Join Date
    Apr 2009
    Posts
    27

    Re: OpenCL C++ Bindings

    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

  3. #13
    Junior Member
    Join Date
    Apr 2009
    Posts
    27

    Re: OpenCL C++ Bindings

    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/

  4. #14
    Junior Member
    Join Date
    Aug 2009
    Posts
    1

    Re: OpenCL C++ Bindings

    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?

  5. #15
    Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Re: OpenCL C++ Bindings

    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?

  6. #16
    Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Re: OpenCL C++ Bindings

    Regarding my post above, I opened http://www.khronos.org/bugzilla/show_bug.cgi?id=200.

  7. #17
    Junior Member
    Join Date
    Apr 2009
    Posts
    27

    Re: OpenCL C++ Bindings

    I have updated the C++ bindings to provide copy constructor for KernelFunctor and the following program now compiles without error:
    Code :
    #include <CL/cl.hpp>
     
    int main(void)
    {
        std::vector<cl::CommandQueue> commandQueues;
        cl::Kernel kernel;
     
        cl::NDRange globalNDRange;
        cl::NDRange localNDRange;
     
        std::vector<cl::KernelFunctor> kernelFunctors;
        for (int d = 0 ; d < commandQueues.size() ; d++) {
            kernelFunctors.push_back(
                kernel.bind(
                    commandQueues[d], 
                    globalNDRange,
                    localNDRange));
        }
    }

    Please let me know if you have any problems using it and thanks for the feedback.

  8. #18
    Junior Member
    Join Date
    Apr 2009
    Posts
    27

    Re: OpenCL C++ Bindings

    > 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?

    I think the issue is that OpenCL will not be supported by Apple until the release of Snow Leopard, version 10.6 of its popular OS X. You can find out more details about Snow Leopard on Apple's website with notice that it will be publicly available August 28. Once you have this upgrade there should be no problem using the C++ bindings.

  9. #19
    Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Re: OpenCL C++ Bindings

    Quote Originally Posted by bgaster
    I have updated the C++ bindings to provide copy constructor for KernelFunctor and the following program now compiles without error:
    <snip>
    Please let me know if you have any problems using it and thanks for the feedback.
    Awesome, thanks!

  10. #20
    Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Re: OpenCL C++ Bindings

    bgaster: Could you please put the bindings under version control (SourceForge, Google Code, GitHub, etc) ?

Page 2 of 10 FirstFirst 123456 ... LastLast

Similar Threads

  1. PyOpenCL: OpenCL Python Bindings
    By inducer77 in forum OpenCL
    Replies: 2
    Last Post: 11-03-2011, 05:46 AM
  2. OpenCL C# bindings
    By The Fiddler in forum OpenCL
    Replies: 1
    Last Post: 08-11-2009, 03:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •