@@ -1402,7 +1402,7 @@ function generic_trimatmul!(C::AbstractVecOrMat, uploc, isunitc, tfun::Function,
1402
1402
@inbounds if uploc == ' U'
1403
1403
if tfun === identity
1404
1404
for j in axes (B,2 )
1405
- for i in axes (B ,1 )
1405
+ for i in axes (A ,1 )
1406
1406
Cij = (unit ? oA : A[i,i]) * B[i,j]
1407
1407
for k in i + 1 : lastindex (B,1 )
1408
1408
Cij += A[i,k] * B[k,j]
@@ -1424,7 +1424,7 @@ function generic_trimatmul!(C::AbstractVecOrMat, uploc, isunitc, tfun::Function,
1424
1424
else # uploc == 'L'
1425
1425
if tfun === identity
1426
1426
for j in axes (B,2 )
1427
- for i in reverse (axes (B ,1 ))
1427
+ for i in reverse (axes (A ,1 ))
1428
1428
Cij = (unit ? oA : A[i,i]) * B[i,j]
1429
1429
for k in firstindex (B,1 ): i - 1
1430
1430
Cij += A[i,k] * B[k,j]
@@ -1434,7 +1434,7 @@ function generic_trimatmul!(C::AbstractVecOrMat, uploc, isunitc, tfun::Function,
1434
1434
end
1435
1435
else # tfun in (transpose, adjoint)
1436
1436
for j in axes (B,2 )
1437
- for i in axes (B, 1 )
1437
+ for i in axes (A, 2 )
1438
1438
Cij = (unit ? oA : tfun (A[i,i])) * B[i,j]
1439
1439
for k in i + 1 : lastindex (B,1 )
1440
1440
Cij += tfun (A[k,i]) * B[k,j]
@@ -1455,7 +1455,7 @@ function generic_trimatmul!(C::AbstractVecOrMat, uploc, isunitc, ::Function, xA:
1455
1455
unit = isunitc == ' U'
1456
1456
@inbounds if uploc == ' U'
1457
1457
for j in axes (B,2 )
1458
- for i in axes (B ,1 )
1458
+ for i in axes (A ,1 )
1459
1459
Cij = (unit ? oA : conj (A[i,i])) * B[i,j]
1460
1460
for k in i + 1 : lastindex (B,1 )
1461
1461
Cij += conj (A[i,k]) * B[k,j]
@@ -1465,7 +1465,7 @@ function generic_trimatmul!(C::AbstractVecOrMat, uploc, isunitc, ::Function, xA:
1465
1465
end
1466
1466
else # uploc == 'L'
1467
1467
for j in axes (B,2 )
1468
- for i in reverse (axes (B ,1 ))
1468
+ for i in reverse (axes (A ,1 ))
1469
1469
Cij = (unit ? oA : conj (A[i,i])) * B[i,j]
1470
1470
for k in firstindex (B,1 ): i - 1
1471
1471
Cij += conj (A[i,k]) * B[k,j]
@@ -1485,7 +1485,7 @@ function generic_mattrimul!(C::AbstractMatrix, uploc, isunitc, tfun::Function, A
1485
1485
@inbounds if uploc == ' U'
1486
1486
if tfun === identity
1487
1487
for i in axes (A,1 )
1488
- for j in reverse (axes (A ,2 ))
1488
+ for j in reverse (axes (B ,2 ))
1489
1489
Cij = A[i,j] * (unit ? oB : B[j,j])
1490
1490
for k in firstindex (A,2 ): j - 1
1491
1491
Cij += A[i,k] * B[k,j]
@@ -1495,7 +1495,7 @@ function generic_mattrimul!(C::AbstractMatrix, uploc, isunitc, tfun::Function, A
1495
1495
end
1496
1496
else # tfun in (transpose, adjoint)
1497
1497
for i in axes (A,1 )
1498
- for j in axes (A, 2 )
1498
+ for j in axes (B, 1 )
1499
1499
Cij = A[i,j] * (unit ? oB : tfun (B[j,j]))
1500
1500
for k in j + 1 : lastindex (A,2 )
1501
1501
Cij += A[i,k] * tfun (B[j,k])
@@ -1507,7 +1507,7 @@ function generic_mattrimul!(C::AbstractMatrix, uploc, isunitc, tfun::Function, A
1507
1507
else # uploc == 'L'
1508
1508
if tfun === identity
1509
1509
for i in axes (A,1 )
1510
- for j in axes (A ,2 )
1510
+ for j in axes (B ,2 )
1511
1511
Cij = A[i,j] * (unit ? oB : B[j,j])
1512
1512
for k in j + 1 : lastindex (A,2 )
1513
1513
Cij += A[i,k] * B[k,j]
@@ -1517,7 +1517,7 @@ function generic_mattrimul!(C::AbstractMatrix, uploc, isunitc, tfun::Function, A
1517
1517
end
1518
1518
else # tfun in (transpose, adjoint)
1519
1519
for i in axes (A,1 )
1520
- for j in reverse (axes (A, 2 ))
1520
+ for j in reverse (axes (B, 1 ))
1521
1521
Cij = A[i,j] * (unit ? oB : tfun (B[j,j]))
1522
1522
for k in firstindex (A,2 ): j - 1
1523
1523
Cij += A[i,k] * tfun (B[j,k])
@@ -1538,7 +1538,7 @@ function generic_mattrimul!(C::AbstractMatrix, uploc, isunitc, ::Function, A::Ab
1538
1538
unit = isunitc == ' U'
1539
1539
@inbounds if uploc == ' U'
1540
1540
for i in axes (A,1 )
1541
- for j in reverse (axes (A ,2 ))
1541
+ for j in reverse (axes (B ,2 ))
1542
1542
Cij = A[i,j] * (unit ? oB : conj (B[j,j]))
1543
1543
for k in firstindex (A,2 ): j - 1
1544
1544
Cij += A[i,k] * conj (B[k,j])
@@ -1548,7 +1548,7 @@ function generic_mattrimul!(C::AbstractMatrix, uploc, isunitc, ::Function, A::Ab
1548
1548
end
1549
1549
else # uploc == 'L'
1550
1550
for i in axes (A,1 )
1551
- for j in axes (A ,2 )
1551
+ for j in axes (B ,2 )
1552
1552
Cij = A[i,j] * (unit ? oB : conj (B[j,j]))
1553
1553
for k in j + 1 : lastindex (A,2 )
1554
1554
Cij += A[i,k] * conj (B[k,j])
0 commit comments