added comments and disclaimer to the readme

This commit is contained in:
Francesco Cozzuto
2022-03-24 19:57:02 +01:00
parent 2bf94bb57f
commit e31b882445
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -1,2 +1,4 @@
# Lina
Lina (***Lin**ear **A**lgebra*) is a C library that implements common linear algebra operations.
Note that this is still a work in progress.
+5 -1
View File
@@ -655,11 +655,15 @@ void lina_conv(double *A, double *B, double *C,
int Ch = Ah - Bh + 1;
assert(Cw > 0 && Ch > 0);
// Iterate over each pixel of the result matrix..
for(int j = 0; j < Ah - Bh + 1; j += 1)
for(int i = 0; i < Aw - Bw + 1; i += 1)
{
C[j * Cw + i] = 0;
// ..and calculate it's value as
// the scalar product between the
// mask B and a portion of A.
C[j * Cw + i] = 0;
for(int v = 0; v < Bh; v += 1)
for(int u = 0; u < Bw; u += 1)
C[j * Cw + i] += A[(i - Bw/2 + u) * Aw + (i - Bh/2 + v)] * B[u * Bw + v];