cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

riza_guntur
Journeyman III

How to construct struct for use as stream data types in brook+?

When I read section A.2 in Stream Computing Usr Guide I found that struct could be used to generate more complex stream elements.

But how to make one? Either I declare it in .br file or C++ I'm getting error message:

1>c:\documents and settings\mic\my documents\visual studio 2008\projects\ta\percobaan_pertama\percobaan_pertama_main.cpp(67) : error C2065: 'five_floats' : undeclared identifier
1>c:\documents and settings\mic\my documents\visual studio 2008\projects\ta\percobaan_pertama\percobaan_pertama_main.cpp(67) : error C2514: 'brook::Stream' : class has no constructors
1>        c:\program files\ati\ati brook+ 1.4.0_beta\sdk\include\brook\stream.h(77) : see declaration of 'brook::Stream'

I'm sure it can ease making the algorithm, how about the performance of such types?

Thanks a lot. There will be more to ask for, this Brook+ really makes me thinks deep down inside just how to access the data, not sure what kind of data structure I would use later on

0 Likes
2 Replies
gaurav_garg
Adept I

The structure has to be declared in .br file. Take a look at sample under legacy\tests\struct. I would not really suggest using struct. The performance with structures is not good specially for data transfer. For kernel, it should be almost similar to using basic datatype streams.

0 Likes

I see. The function containing the struct should be in .br file, like Stream SDK 1.3b.

I would stick to basic types.

0 Likes