Skip to content

Commit 80abe17

Browse files
committed
Use chksquare in trsyl!
1 parent 26e7b87 commit 80abe17

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

base/linalg/dense.jl

-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ sylvester{T<:Integer}(A::StridedMatrix{T},B::StridedMatrix{T},C::StridedMatrix{T
473473

474474
# AX + XA' + C = 0
475475
function lyap{T<:BlasFloat}(A::StridedMatrix{T},C::StridedMatrix{T})
476-
chksquare(A, C)
477476
R, Q = schur(A)
478477

479478
D = -Ac_mul_B(Q,C*Q)

base/linalg/lapack.jl

+2-7
Original file line numberDiff line numberDiff line change
@@ -3672,15 +3672,10 @@ for (fn, elty, relty) in ((:dtrsyl_, :Float64, :Float64),
36723672
(:ctrsyl_, :Complex64, :Float32))
36733673
@eval begin
36743674
function trsyl!(transa::BlasChar, transb::BlasChar, A::StridedMatrix{$elty}, B::StridedMatrix{$elty}, C::StridedMatrix{$elty}, isgn::Int=1)
3675-
chkstride1(A)
3676-
chkstride1(B)
3677-
chkstride1(C)
3678-
m = size(A, 1)
3679-
n = size(B, 1)
3675+
chkstride1(A, B, C)
3676+
m, n = chksquare(A, B)
36803677
lda = max(1, stride(A, 2))
36813678
ldb = max(1, stride(B, 2))
3682-
if lda < m throw(DimensionMismatch("")) end
3683-
if ldb < n throw(DimensionMismatch("")) end
36843679
m1, n1 = size(C)
36853680
if m != m1 || n != n1 throw(DimensionMismatch("")) end
36863681
ldc = max(1, stride(C, 2))

0 commit comments

Comments
 (0)