aboutsummaryrefslogtreecommitdiff
path: root/sys/mwcs/gen/mwvmulr.x
blob: 54a0776e6b9e5f1d7648895fe38c93fc87a9b378 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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