Block Sizes

Hi,

This may be trivial but I couldn’t think beyond :D … I was doing some manipulation with matrices. In the SDK sample matrix_mul the heights and widths of the matrices being multiplied are multiples of the block size. My question is if the matrix we are dealing with is rectangular and also either the height/ width is a prime number would it be possible to specify a block size to do the required computation accurately?

Thanks in advance.

Shyam

For the blocks on the edge of the matrix you can branch in the shader to not compute elements beyond the edge of the matrix.

Mark

Hi Mark,

Could you please explain a little more. I am relatively new to programming. Would I have to give conditional statement? perhaps a simple example from your side would help me. Hope this isn’t too time consuming for you. Thanks a ton.

Shyam