Page 1 of 1

Doing multiply matrix operations then send back answer to CPU

Posted: Mon Apr 22, 2019 3:05 pm
by NASA_SimDeveloper
I have many matrix operations that I need to be done on the GPU prior to sending the find answer back to the CPU. What are your suggestions on performing this on the GPU without continuously communicating with the CPU? These are equations of motion using 130x130 dense matrices.

            // A = M^-1*RHS
            // A^T = |Arns Af| (separate rigid/nozzle/slosh from flex)
            // RHS^T = |xrns xf|
            // | A   B |^-1 |xrns| = | (A - B*D^-1*C)^-1           -(A - B*D^-1*C)^-1*B*D^-1             | |xrns|
            // | C   D |    | xf |   | -D^-1*C*(A - B*D^-1*C)^-1   D^-1 + D^-1*C*(A - B*D^-1*C)^-1B*D^-1 | | xf |

            // Arns = (A - B*D^-1*C)^-1*(Xrns - B*D^-1*Xf)
            // Af   = D^-1*Xf - D^-1*C*Arns