danielglodes@gmail.com

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

Discussion created by danielglodes@gmail.com on Mar 26, 2008
Latest reply on Mar 31, 2008 by danielglodes@gmail.com
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.

Outcomes