Skip to content

Commit

Permalink
[software] Clean up
Browse files Browse the repository at this point in the history
[software] Add comment on algorithm
  • Loading branch information
mbertuletti committed Apr 13, 2023
1 parent c00d60b commit fb78b4d
Show file tree
Hide file tree
Showing 6 changed files with 653 additions and 664 deletions.
7 changes: 0 additions & 7 deletions software/apps/mat_inv/initialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ void init_matrix_zeros(int32_t *matrix, uint32_t num_rows, uint32_t num_columns,
uint32_t core_id);

void display(int32_t *A, int32_t n, int32_t m) {
// int32_t i, j;
// for (i = 0; i < n; i++) {
// for (j = 0; j < m; j++) {
// printf("%8d ", A[i * m + j]);
// }
// printf("\n");
//}
int32_t i;
for (i = 0; i < n * m; i++) {
printf("Output[%d] = %8d\n", i, A[i]);
Expand Down
17 changes: 7 additions & 10 deletions software/apps/mat_inv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,18 @@

#define N 16
#define M 16
#define O 16
#define N_BANKS (1024)
#define N_USED_BANKS (64)
#define N_USED_BANKS (16)

#define VERBOSE
// #define SINGLE
#define SINGLE
// #define PARALLEL
#define MEMSIZED
// #define MEMSIZED
// #define FOLDED

#include "initialization.h"
#include "mempool_mat_inv_q32p.h"
#include "mempool_mat_inv_q32p_folded.h"
#include "mempool_mat_inv_q32p_memsized.h"
#include "mempool_mat_inv_q32s.h"
#include "kernel/mempool_mat_inv_q32p.h"
#include "kernel/mempool_mat_inv_q32s.h"

#ifdef FOLDED
int32_t matrix[N * M] __attribute__((aligned(N_BANKS), section(".l1")));
Expand Down Expand Up @@ -107,7 +104,7 @@ void multi_core_memsized() {
mempool_barrier(num_cores);

mempool_start_benchmark();
mempool_GJinv_q32p_memsized(matrix, inv, M, &flag);
mempool_GJinv_memsized_q32p(matrix, inv, M, &flag);
mempool_stop_benchmark();

mempool_barrier(num_cores);
Expand Down Expand Up @@ -141,7 +138,7 @@ void multi_core_folded() {
mempool_stop_benchmark();
if (core_id < nPE) {
mempool_start_benchmark();
mempool_GJinv_q32p_folded(folded_matrix, inv, M, &flag, nPE);
mempool_GJinv_folded_q32p(folded_matrix, inv, M, &flag, nPE);
mempool_stop_benchmark();
}
mempool_barrier(num_cores);
Expand Down
Loading

0 comments on commit fb78b4d

Please sign in to comment.