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/mwmmulr.x | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sys/mwcs/gen/mwmmulr.x (limited to 'sys/mwcs/gen/mwmmulr.x') diff --git a/sys/mwcs/gen/mwmmulr.x b/sys/mwcs/gen/mwmmulr.x new file mode 100644 index 00000000..83e14d2c --- /dev/null +++ b/sys/mwcs/gen/mwmmulr.x @@ -0,0 +1,21 @@ +# MW_MMUL -- Matrix multiply. + +procedure mw_mmulr (a, b, c, ndim) + +real a[ndim,ndim] #I left input matrix +real b[ndim,ndim] #I right input matrix +real c[ndim,ndim] #O output matrix +int ndim #I dimensionality of system + +int i, j, k +real v + +begin + do j = 1, ndim + do i = 1, ndim { + v = 0 + do k = 1, ndim + v = v + a[k,j] * b[i,k] + c[i,j] = v + } +end -- cgit