Results 1 to 3 of 3

Thread: newbie question about OpenGL

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    13

    newbie question about OpenGL

    Hello everyone,

    So far I have been maintaining some code that uses CUDA and there is a vanilla C++ version.

    Now, I would like to move everything to OpenCL and please correct me if I am wrong:

    - I should be able to maintain a single OpenCL code base. My project is open source and as long as a user can get an OpenCL compiler for their system, they should be able to build the code for the underlying hardware. For example, if the user only has a quad core CPU, the code should be able to take advantage of that. Otherwise, if they have a OpenCL compatible graphics card, it should be able to take advantage of that.

    - Also, I am very confused as to what I need to start doing the development. I have an AMD CPU and an NVIDIA GPU. Now, do I need to ensure that I install the AMD SDK and the NVIDIA SDK or is there one SDK that can take care of all of this. With such multiple devices supporting OpenCL, how is all of this managed?

    I would be grateful if someone could point out a good starting point and how to solve this SDK issue. I am going to use OpenCL for pure computation (image processing algorithms primarily).

    Many thanks and I look forward to the replies,

    xargon

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    271

    Re: newbie question about OpenGL

    Quote Originally Posted by xargon
    Hello everyone,

    So far I have been maintaining some code that uses CUDA and there is a vanilla C++ version.

    Now, I would like to move everything to OpenCL and please correct me if I am wrong:

    - I should be able to maintain a single OpenCL code base. My project is open source and as long as a user can get an OpenCL compiler for their system, they should be able to build the code for the underlying hardware. For example, if the user only has a quad core CPU, the code should be able to take advantage of that. Otherwise, if they have a OpenCL compatible graphics card, it should be able to take advantage of that.

    - Also, I am very confused as to what I need to start doing the development. I have an AMD CPU and an NVIDIA GPU. Now, do I need to ensure that I install the AMD SDK and the NVIDIA SDK or is there one SDK that can take care of all of this. With such multiple devices supporting OpenCL, how is all of this managed?

    I would be grateful if someone could point out a good starting point and how to solve this SDK issue. I am going to use OpenCL for pure computation (image processing algorithms primarily).

    Many thanks and I look forward to the replies,

    xargon
    The SDK doesn't provide much apart from some profiling tools and some headers: everything at run-time is provided by libOpenCL which is maintained and comes from khronos (i believe), so every vendor ships the same one as part of their graphics driver/run-time. It finds the backends (platforms) at run-time. So for development you should be able to use any sdk from any vendor, unless you want vendor-specific extensions (I use JOCL personally, and for that I don't even need an SDK to write code). You only need an SDK if you don't otherwise have a run-time, e.g. intel, or amd before they included it in the gpu driver/you don't have a compatible card.

    Single code-base isn't that simple: some cards have more features than others, although modern ones have a pretty common baseline. Also given the hardware is so different different algorithms may be required to attain peak performance for a given machine. The difference can be an order of magnitude in performance too. But in general, unless you use specific vendor features or require specific topology, a single set of code should at least run.

    What's the project?

  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    13

    Re: newbie question about OpenGL

    Thanks! The project is about optimizing certain parameters to reconstruct some optical images and there is a lot of image post processing involved. So a lot of operations like resampling, convolutions etc.

    I will start with the NVIDIA kit and get my hands dirty at the moment and hopefully things will start to clear up as I go along.

    Many thanks for your helpful reply.

    /x

Similar Threads

  1. Newbie question
    By lkeene in forum OpenCL
    Replies: 2
    Last Post: 07-21-2009, 11:29 AM
  2. newbie question - porting OpenGL ES to any embedded device
    By digitalkin in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 05-21-2007, 07:18 AM

Posting Permissions

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