From 01e386388054e043114818ab8b1f48739983e99d Mon Sep 17 00:00:00 2001 From: cozis Date: Fri, 14 Jan 2022 01:05:01 +0100 Subject: [PATCH] added tests and fixed bug --- lina.c | 13 ++++----- test.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 10 deletions(-) diff --git a/lina.c b/lina.c index 92670a8..a0c6aef 100644 --- a/lina.c +++ b/lina.c @@ -20,7 +20,7 @@ void lina_dot(double *A, double *B, double *C, int m, int n, int l){ for(int k=0; k < l; k++){ double pos = 0; - + //Iteration over the single B column for executing the product of sum for(int j=0; j < n; j++) pos += A[i * n + j] * B[j * l + k]; @@ -71,14 +71,11 @@ void lina_transpose(double *A, double *B, int m, int n){ memcpy(support, A, sizeof(*support) * m * n); - for(int i=0;i