-1

Hi,

I have a bit of a complicated problem

I have a class (Holder) with 4 arrays (arr1, arr2, arr3, arr4). Currently I have a class function which processes these arrays so I dont have to return anything since they are part of the class.

But I need to port my code to Brook+. Basically you write a function in Brook+ and compile it and it gives a cpp file which you can use in your program.

but the Brook + language doesnt allow classes, so I have to pass the 4 arrays individually. I have done this and have seen 600% performance increase using my Brook+ function (since it uses the GPU). but the problem is I need to return those values back to the class.

How do I go about doing this?

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by realmayo
0

Well I am not able to get your problem exactly but from what I have got I think you can write a friend function which can read those arrays and write it conveniently to the place you want so that you have all the array values which is as good as returning all the four arrays.

0

Well I am not able to get your problem exactly but from what I have got I think you can write a friend function which can read those arrays and write it conveniently to the place you want so that you have all the array values which is as good as returning all the four arrays.

Oh I just wrote a long replay, but after I posted it i just got what you meant... Thanks, I got it now!

Edited by realmayo: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.