Matrix Determination Help

Dear all,

I try to implement matrix determination (that is used cofactor and minor) from C code to be CUDA code but it difficult for me.

Anyone have an idea or sample code for this case.

Thank you for all answer.