@@ -2975,10 +2975,10 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in
29752975 mA = size (A, 1 )
29762976 k = length (tau)
29772977 if side == ' L' && m != mA
2978- throw (DimensionMismatch (lazy " for a left-sided multiplication, the first dimension of C, $m, must equal the second dimension of A, $mA" ))
2978+ throw (DimensionMismatch (lazy " for a left-sided multiplication, the first dimension of C, $m, must equal the first dimension of A, $mA" ))
29792979 end
29802980 if side == ' R' && n != mA
2981- throw (DimensionMismatch (lazy " for a right-sided multiplication, the second dimension of C, $m , must equal the second dimension of A, $mA" ))
2981+ throw (DimensionMismatch (lazy " for a right-sided multiplication, the second dimension of C, $n , must equal the first dimension of A, $mA" ))
29822982 end
29832983 if side == ' L' && k > m
29842984 throw (DimensionMismatch (lazy " invalid number of reflectors: k = $k should be <= m = $m" ))
@@ -3025,10 +3025,10 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in
30253025 mA = size (A, 1 )
30263026 k = length (tau)
30273027 if side == ' L' && m != mA
3028- throw (DimensionMismatch (lazy " for a left-sided multiplication, the first dimension of C, $m, must equal the second dimension of A, $mA" ))
3028+ throw (DimensionMismatch (lazy " for a left-sided multiplication, the first dimension of C, $m, must equal the first dimension of A, $mA" ))
30293029 end
30303030 if side == ' R' && n != mA
3031- throw (DimensionMismatch (lazy " for a right-sided multiplication, the second dimension of C, $m , must equal the second dimension of A, $mA" ))
3031+ throw (DimensionMismatch (lazy " for a right-sided multiplication, the second dimension of C, $n , must equal the first dimension of A, $mA" ))
30323032 end
30333033 if side == ' L' && k > m
30343034 throw (DimensionMismatch (lazy " invalid number of reflectors: k = $k should be <= m = $m" ))
@@ -3078,7 +3078,7 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in
30783078 throw (DimensionMismatch (lazy " for a left-sided multiplication, the first dimension of C, $m, must equal the second dimension of A, $nA" ))
30793079 end
30803080 if side == ' R' && n != nA
3081- throw (DimensionMismatch (lazy " for a right-sided multiplication, the second dimension of C, $m , must equal the second dimension of A, $nA" ))
3081+ throw (DimensionMismatch (lazy " for a right-sided multiplication, the second dimension of C, $n , must equal the second dimension of A, $nA" ))
30823082 end
30833083 if side == ' L' && k > m
30843084 throw (DimensionMismatch (lazy " invalid number of reflectors: k = $k should be <= m = $m" ))
@@ -5391,9 +5391,9 @@ for (syev, syevr, syevd, sygvd, elty) in
53915391 W = similar (A, $ elty, n)
53925392 ldz = n
53935393 if jobz == ' N'
5394- Z = similar (A, $ elty, ldz, 0 )
5394+ Z = similar (A, $ elty, 0 )
53955395 elseif jobz == ' V'
5396- Z = similar (A, $ elty, ldz, n)
5396+ Z = similar (A, $ elty, ldz * n)
53975397 end
53985398 isuppz = similar (A, BlasInt, 2 * n)
53995399 work = Vector {$elty} (undef, 1 )
@@ -5423,7 +5423,8 @@ for (syev, syevr, syevd, sygvd, elty) in
54235423 resize! (iwork, liwork)
54245424 end
54255425 end
5426- W[1 : m[]], Z[:,1 : (jobz == ' V' ? m[] : 0 )]
5426+ zm = jobz == ' V' ? m[] : 0
5427+ resize! (W, m[]), reshape (resize! (Z, ldz * zm), ldz, zm)
54275428 end
54285429 syevr! (jobz:: AbstractChar , A:: AbstractMatrix{$elty} ) =
54295430 syevr! (jobz, ' A' , ' U' , A, 0.0 , 0.0 , 0 , 0 , - 1.0 )
@@ -5593,10 +5594,10 @@ for (syev, syevr, syevd, sygvd, elty, relty) in
55935594 W = similar (A, $ relty, n)
55945595 if jobz == ' N'
55955596 ldz = 1
5596- Z = similar (A, $ elty, ldz, 0 )
5597+ Z = similar (A, $ elty, 0 )
55975598 elseif jobz == ' V'
55985599 ldz = n
5599- Z = similar (A, $ elty, ldz, n)
5600+ Z = similar (A, $ elty, ldz * n)
56005601 end
56015602 isuppz = similar (A, BlasInt, 2 * n)
56025603 work = Vector {$elty} (undef, 1 )
@@ -5632,7 +5633,8 @@ for (syev, syevr, syevd, sygvd, elty, relty) in
56325633 resize! (iwork, liwork)
56335634 end
56345635 end
5635- W[1 : m[]], Z[:,1 : (jobz == ' V' ? m[] : 0 )]
5636+ zm = jobz == ' V' ? m[] : 0
5637+ resize! (W, m[]), reshape (resize! (Z, ldz * zm), ldz, zm)
56365638 end
56375639 syevr! (jobz:: AbstractChar , A:: AbstractMatrix{$elty} ) =
56385640 syevr! (jobz, ' A' , ' U' , A, 0.0 , 0.0 , 0 , 0 , - 1.0 )
0 commit comments