From 5d51d25456e45140510d464ce77a31df5d1fb22d Mon Sep 17 00:00:00 2001 From: Francesco Cozzuto Date: Tue, 11 Jan 2022 17:43:50 +0100 Subject: [PATCH] added function interfaces --- lina.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lina.h diff --git a/lina.h b/lina.h new file mode 100644 index 0000000..04f5bdc --- /dev/null +++ b/lina.h @@ -0,0 +1,16 @@ + +// Evaluate the dot product C = A*B where C is of size m by l, A is m by n and B is n by l. +// NOTE: C can't be the same pointer of A or B. +void lina_dot(double *A, double *B, double *C, unsigned int m, unsigned int n, unsigned int l); + +// Evaluate C = A + B where A,B,C are m by n. +// NOTE: C can be the same location of A or B. +void lina_add(double *A, double *B, double *C, unsigned int m, unsigned int n); + +// Evaluate B = k*A where A and B are m by n matrices. +// NOTE: B can be the same location of A. +void lina_scale(double *A, double *B, double k, unsigned int m, unsigned int n); + +// Evaluate B = A^t (the transpose of A) where A is m by n. +// NOTE: B can be the same location of A. +void lina_transpose(double *A, double *B, unsigned int m, unsigned int n); \ No newline at end of file