cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

danielglodes
Journeyman III

Brook issue when I try to make row operation in a matrix.

Hi,
I try to perform operations (add, mul, sub or dot ) for two rows (r1 and r2) in a matrix like in below kernel:

kernel void row_add(float a[10][10], float r1, float r2, out float row<10,1> )
{
//row=a[r1].x+a[r2].x;
float pos = indexof(row);
row=a[float((r1,pos)]+a[(r2,pos))];
}

Compiler don't get any error but when I try to show result I don't see anything

row_add(mStream,1,2,aStream);
streamWrite(aStream, &output);
for (i = 0; i < Length; ++i) { printf(" %3.2lf ",output); }

Where I wrong ? How can I do this ?

Thanks,
Dan.
0 Likes
2 Replies

Hi Dan, do you have a complete test case you can share with me? If so, I'll pass it along to the engineers here to take a look.

Michael.
0 Likes

Hi,
I find the issue why I dont see working printf . It was a address pointer issue.


streamWrite(aStream, &output); instead - > streamWrite(aStream, output);


Cheers,
Dan.
0 Likes