1 Reply Latest reply on Jun 11, 2011 9:46 PM by rick.weber

    Brook+ and OpenCL

      What is the main difference


      I compared Brook+ and OpenCL and have some questions. Actually I use OpenCL now, but also curious with Brook+. Maybe it more suitable to problem I want to solve.

      What is the main difference between Brook+ and OpenCL in term of programming model? In Brook+ programming guide, it always mention stream programming model.

      1. Is this stream programming model equal to data-parallel programming model in OpenCL? Which one is more low-level (close to hardware assembly language) Brook+ or OpenCL?

      2. How to adapt (or maybe I should say convert) a Brook+ program to OpenCL? Is it a straightforward process or have to change the programming model or something? Of course should change the syntax :). But I think you can understand what I mean :)

      3. Can I use the AMD APP SDK 2.4 to write Brook+ code?

      Anyone can help explain and answer my questions? (Still a newbie on this stuff). Thank you.

        • Brook+ and OpenCL

          1) While the defining feature of stream computing was always a little vague to me, for the most part in Brook+, each thread wrote to only one element of a vector and each vector was read or write only.

          2) OpenCL is more portable, more flexible, and probably lower level. However, neither of them is as low level as assembly code, as they both have C-like syntax (OpenCL is in fact a superset of C99). If you really wanted to use the more restrictive streaming model, declare all your data in images and only sample and write to the pixel corresponding to your global thread id, but I don't know why one would insist on this.

          3) No.