36 template <
typename T,
int32 nRow,
int32 nInner,
int32 nCol >
37 void MatMul(T(&A)[nRow][nInner], T(&B)[nInner][nCol], T(&C)[nRow][nCol]);
39 template <
typename T,
int32 nRow,
int32 nCol >
40 void assignMat(T(&A)[nRow][nCol], T(&B)[nRow][nCol]);
72 template <
typename T,
int32 nRow,
int32 nInner,
int32 nCol >
73 void MatMul(T(&A)[nRow][nInner], T(&B)[nInner][nCol], T(&C)[nRow][nCol])
76 for (
int32 row = 0; row < nRow; row++)
78 for (
int32 col = 0; col < nCol; col++)
81 for (
int inner = 0; inner < nInner; inner++)
83 sum += A[row][inner] * B[inner][col];
90 template <
typename T,
int32 nRow,
int32 nCol >
91 void assignMat(T(&A)[nRow][nCol], T(&B)[nRow][nCol])
94 for (
int32 row = 0; row < nRow; row++)
96 for (
int32 col = 0; col < nCol; col++)
98 B[row][col] = A[row][col];