1. That structure is quite complex, you can't use arrays inside structures in the current version, I also think it doesn't support mixing float and double types. You have a very simple working example in: "BROOK\samples\legacy\tests\struct"
A workaround is to use structure members as individual kernel parameters. AMD people tells that even if you use structures the compiler transforms them in simple parameters (However if you need to use structures anyway, I think that Brook+ compiler makes this faster than you packing and unpacking data for the GPU).
Note that if your kernel requires too many input/output streams the compiler will split your kernel in several passes and it will be slower.
2. That's right, I also think not having local arrays is a big restriction. It would be useful even if they just unroll arrays in simple GPU register operations (by the way, I think even if local arrays are suported 4096 elements is quite big to fit in the registers of a single thread).
3. Well, that isn't really a problem, is just that you can't call CPU code from GPU kernels. You still can use functions and macros:
- If you want to use those functions within GPU code define them as kernels, it will work as long as you don't use recursive calls. For example "kernel int next(int i) { return i + 1; }" can be called normally from other kernels.
- If you want to enable macros use "-pp" flag when calling BRCC compiller to enable the preprocessor.
As mentioned by Ceq, arrays inside struct is not supported.
You can have multiple gather streams, but you can't have more than one scatter streams and 8 regular output streams.
Originally posted by: gaurav.garg
As mentioned by Ceq, arrays inside struct is not supported.
You can have multiple gather streams, but you can't have more than one scatter streams and 8 regular output streams.
No, it is not possible.
The kernel should work fine but, aliasing is not possible.
Originally posted by: gaurav.garg
The kernel should work fine but, aliasing is not possible.