1 // Copyright (C) 2018 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
7 static inline void matrixMult(float *A, float *B, float *C, int m, int n, int k, bool transposeB = false) {
9 for (int rowA = 0; rowA < m; rowA++) {
10 for (int rowB = 0; rowB < n; rowB++) {
12 for (int colA = 0; colA < k; colA++) {
13 sum += A[rowA * k + colA] * B[rowB * k + colA];
16 C[rowA * n + rowB] = sum;
20 for (int rowA = 0; rowA < m; rowA++) {
21 for (int colB = 0; colB < n; colB++) {
23 for (int colA = 0; colA < k; colA++) {
24 sum += A[rowA * k + colA] * B[colA * n + colB];
27 C[rowA * n + colB] = sum;