diff options
Diffstat (limited to 'packages/base/src/C/lapack-aux.c')
-rw-r--r-- | packages/base/src/C/lapack-aux.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/packages/base/src/C/lapack-aux.c b/packages/base/src/C/lapack-aux.c index a977d5f..ac03120 100644 --- a/packages/base/src/C/lapack-aux.c +++ b/packages/base/src/C/lapack-aux.c | |||
@@ -1287,28 +1287,19 @@ int multiplyQ(int ta, int tb, KQMAT(a),KQMAT(b),QMAT(r)) { | |||
1287 | OK | 1287 | OK |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | int multiplyI(int ta, int tb, KIMAT(a), KIMAT(b), IMAT(r)) { | 1290 | |
1291 | int i,j,k; | 1291 | int multiplyI(KOIMAT(a), KOIMAT(b), OIMAT(r)) { |
1292 | int n; | 1292 | { TRAV(r,i,j) { |
1293 | int ai,ak,bk,bj; | 1293 | int k; |
1294 | 1294 | AT(r,i,j) = 0; | |
1295 | n = ta ? ar : ac; | 1295 | for (k=0;k<ac;k++) { |
1296 | 1296 | AT(r,i,j) += AT(a,i,k) * AT(b,k,j); | |
1297 | if (ta==0) { ai = 1; ak = ar; } else { ai = ar; ak = 1; } | ||
1298 | if (tb==0) { bk = 1; bj = br; } else { bk = br; bj = 1; } | ||
1299 | |||
1300 | for (i=0;i<rr;i++) { | ||
1301 | for (j=0;j<rc;j++) { | ||
1302 | rp[i+rr*j] = 0; | ||
1303 | for (k=0; k<n; k++) { | ||
1304 | rp[i+rr*j] += ap[ai*i+ak*k] * bp[bk*k+bj*j]; | ||
1305 | } | ||
1306 | } | 1297 | } |
1298 | } | ||
1307 | } | 1299 | } |
1308 | OK | 1300 | OK |
1309 | } | 1301 | } |
1310 | 1302 | ||
1311 | |||
1312 | //////////////////// transpose ///////////////////////// | 1303 | //////////////////// transpose ///////////////////////// |
1313 | 1304 | ||
1314 | int transF(KFMAT(x),FMAT(t)) { | 1305 | int transF(KFMAT(x),FMAT(t)) { |