Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

Brook+ Limitations?

Regarding Brook+ Limitations


   I've been testing some sample applications to use Brook+ for the past few days and I ran into a few (undocumented?) problems.  I have only looked at the brookspec-v1.pdf,  so if there's a later version please let me know.

  1)  It seems that bitwise operations are not permitted inside kernels.  Essentially,  brook+ is  typecasting all integers to float (or __BrtFloat1) in the generated cpp.   Is this correct?.  I've looked at some documentation online that suggests that the stream processor itself (and the IL) support integers. 

Can I have proper integer (including bitwise operator) support if I use the low-level CAL instead (looking at IL documentation, I can see IOR, IXOR etc., listed, but I don't know if it actually works)?

  2) Also, local arrays don't seem to be supported.   I guess this is another restriction of Brook (and doesn't apply to CAL?)

  3) I sometimes get parse errors on apparently legitimate C code inside the kernels.  For instance

   unsigned int t = (unsigned int) 0xF1;

  gives me a long list of parse error messages starting with


NOTICE: Parse error
While processing <buffer>:61
In compiler at zzerror()[]
  message = syntax error


  (whereas removing the unsigned int typecast removes the problem).

Is there a way I can ask brook plus to point out on which source line the error occurs (as opposed to the location inside its own parser)?

  4)  Is there a publicly available roadmap etc., as to when the next version of Brook+ will be released?  Looking at the error msgs, documentation I imagine the current Brook+ implementation is Beta(ish) whereas the CAL is a bit more polished.  Has anyone who used CAL comment on how polished it is?



2 Replies
Adept I

Hi there,

I've been doing a bit of CAL/IL programming recently, and, up to one or two differences between the documentation and implementation (e.g. source swizzles), things seemed to have pretty much worked properly. I think I've posted about most issues I've come up against, in particular on negating doubles, driver problems with large streams on linux, and the interpretation of domain parameters.

Journeyman III

Hi, I'm just a user but there have a been some previous threads regarding your questions. Here:

1. As far as I know IL supports ints and Brook+ should also (although they stated this it is NOT in the documentation anywhere, in fact, the Mar08 release note says Brook+ does NOT support ints while the May08 release notes never say that it does), not sure if bitwise operations are supported but I believe not, but I could be wrong, maybe someone from AMD will answer this one for you.

2. Local arrays are not supported yet in Brook+:


3. Unsigned ints are not supported:


4. There has not been any word of a published timeline on an official Firestream SDK, my guess would be it's far off since Brook+ is so limited right now in BETA. They have said that since Brook+ is biult on CAL that CAL gets the features first, then they build them into Brook+, so at any given moment, I would imagine CAL to be more robust, also since you can code directly in GPU ISA. That said, the learning curve for CAL is much higher and it certainly increases development time (the code overhead in CAL is quite large, pretty much like setting up an SL kernel).

Personally, after trying to work in Brook+ I simply found it entirely too limited to be of any practical use (even for applications that are embarassingly parallel) so I have moved on to CAL. I have not yet discovered a way to deal with non-same size arrays in CAL.

More limitations:

Only 1 output scatter stream, PERIOD:


Also, they have not tested multiple output streams of differing sizes. I have tried this to no avail.

Also, I have tried multiple output streams where one is a scatter and the other is a stream, also to no avail.

Also, scatter streams only support 128-bit (float4/int4/double2).

By far the biggest disadvantage and limitation of Brook+ is undoubtedly the extremely limited documentation. I honestly hope that AMD strongly considers releasing proper documentation when they release the official version.