Inverse of Matrix

Hello! I’m a begginer in CUDA and i have some problems with calculation of inverse matrix. I wrote some code (really bad, but simple), but it doesn’t works if matrix is larger than 6x6. Can somebody find a problem here?

Problem solved, topic can be deleted =)
Code was very-very bad.

If you do it in each thread I’m interested to see your code.

Here is an old Intel tech note on computing the 6x6 inverse using SSE instructions that should give you a pretty useful starting point for doing the complete inverse on a thread-by-thread basis.