Matrix Multiplication

Hello,

I am trying to change Matrix multiplication provided by Nvidia SDK 2.3. I just changed multiplication into plus operation and plus into minimum operation. I am stuck and do not know that which position is the minimum element in each vector.

and here is an example.

A= 17.00, 16.00, 15.00, 14.00
13.00, 12.00, 11.00, 10.00
9.00, 8.00, 7.00, 6.00
5.00, 4.00, 3.00, 2.00

B= 17.00, 16.00, 15.00, 14.00
13.00, 12.00, 11.00, 10.00
9.00, 8.00, 7.00, 6.00
5.00, 4.00, 3.00, 2.00

so Matrix P should be

P= 3, 3, 3, 3
3, 3, 3, 3
3, 3, 3, 3
3, 3, 3, 3