diff --git a/sycl_comp.cpp b/sycl_comp.cpp index 8def274..5394fd8 100644 --- a/sycl_comp.cpp +++ b/sycl_comp.cpp @@ -18,7 +18,7 @@ auto matrixMultCPU(const Matrix &matA, const Matrix &matB) { Matrix res(matA.rows, matB.cols); for (std::uint32_t i = 0; i < res.rows; i++) { for (std::uint32_t j = 0; j < res.cols; j++) { - auto &res_val = res(j, i) = 0; + auto &res_val = res(i, j) = 0; for (std::uint32_t k = 0; k < matA.cols; k++) { res_val += matA(i, k) * matB(k, j); } @@ -34,7 +34,7 @@ auto matrixMultTransposeCPU(const Matrix &matA, const Matrix &matB) { Matrix res(matA.rows, matB.cols); for (std::uint32_t i = 0; i < res.rows; i++) { for (std::uint32_t j = 0; j < res.cols; j++) { - auto &res_val = res(j, i) = 0; + auto &res_val = res(i, j) = 0; for (std::uint32_t k = 0; k < matA.cols; k++) { res_val += matA(i, k) * matB_t(j, k); }