From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/mwcs/gen/mwvmulr.x | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sys/mwcs/gen/mwvmulr.x (limited to 'sys/mwcs/gen/mwvmulr.x') diff --git a/sys/mwcs/gen/mwvmulr.x b/sys/mwcs/gen/mwvmulr.x new file mode 100644 index 00000000..54a0776e --- /dev/null +++ b/sys/mwcs/gen/mwvmulr.x @@ -0,0 +1,20 @@ +# MW_VMUL -- Vector multiply. + +procedure mw_vmulr (a, b, c, ndim) + +real a[ndim,ndim] #I input matrix +real b[ndim] #I input vector +real c[ndim] #O output vector +int ndim #I system dimension + +int i, j +real v + +begin + do j = 1, ndim { + v = 0 + do i = 1, ndim + v = v + a[i,j] * b[i] + c[j] = v + } +end -- cgit