forgot barrier in mt-matmul
[riscv-tests.git] / benchmarks / mt-matmul / matmul.c
index 95fbe0303d762ba5f5981a30301448311e4b8606..c38914d4d972b4c10b644d14d6e011eb4e8baea5 100644 (file)
@@ -1,4 +1,5 @@
 #include "dataset.h"
+#include "util.h"
 
 //--------------------------------------------------------------------------
 // single-thread, naive version
@@ -15,6 +16,7 @@ void __attribute__((noinline)) matmul(const int coreid, const int ncores, const
          {
             C[i + j*lda] += A[j*lda + k] * B[k*lda + i];
          }
+         barrier(ncores);
       }
    }
 }