| 51 | } |
| 52 | |
| 53 | static void _originMatMul(float* C, const float* A, const float* B, int e, int l, int h) { |
| 54 | for (int y = 0; y < e; ++y) { |
| 55 | auto AY = A + l * y; |
| 56 | auto CY = C + h * y; |
| 57 | for (int x = 0; x < h; ++x) { |
| 58 | auto BX = B + x; |
| 59 | float expected = 0.0f; |
| 60 | for (int k = 0; k < l; ++k) { |
| 61 | expected += AY[k] * BX[k * h]; |
| 62 | } |
| 63 | CY[x] = expected; |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | class MatMulTest : public MNNTestCase { |
| 68 | public: |
| 69 | virtual bool run(int precision) { |