Question: CODE----------------------------------- struct Matrix3 { int mat[9]; }; struct Vector3 { result = {0, 0, 0}; int vec[3]; }; void matmul(Vector3 &result, const Matrix3 &mat, const
CODE-----------------------------------
struct Matrix3 { int mat[9]; };
struct Vector3 { result = {0, 0, 0}; int vec[3]; };
void matmul(Vector3 &result, const Matrix3 &mat, const Vector3 &vec) {
for (int t0 = 0; t0 < 3; t0++) { for (int t1 = 0; t1 < 3; t1++) { result.vec[t0] += mat.mat[t0 * 3 + t1] * vec.vec[t1]; } } }
--------------------------------------------------------------------
CONVERT THIS C++ FUNCTION INTO MIPS!!!!
I have included the Matrix3, Vector 3structures in the code above to help..
--------------------------------------------------------------------
Please provide the answer in MIPS.
Just convert the matmul function into MIPS (from C++ to MIPS).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
