Skip to content

Commit

Permalink
Use chksquare in trsyl!
Browse files Browse the repository at this point in the history
  • Loading branch information
mschauer committed Jun 30, 2014
1 parent 26e7b87 commit 80abe17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion base/linalg/dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ sylvester{T<:Integer}(A::StridedMatrix{T},B::StridedMatrix{T},C::StridedMatrix{T

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

D = -Ac_mul_B(Q,C*Q)
Expand Down
9 changes: 2 additions & 7 deletions base/linalg/lapack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3672,15 +3672,10 @@ for (fn, elty, relty) in ((:dtrsyl_, :Float64, :Float64),
(:ctrsyl_, :Complex64, :Float32))
@eval begin
function trsyl!(transa::BlasChar, transb::BlasChar, A::StridedMatrix{$elty}, B::StridedMatrix{$elty}, C::StridedMatrix{$elty}, isgn::Int=1)
chkstride1(A)
chkstride1(B)
chkstride1(C)
m = size(A, 1)
n = size(B, 1)
chkstride1(A, B, C)
m, n = chksquare(A, B)
lda = max(1, stride(A, 2))
ldb = max(1, stride(B, 2))
if lda < m throw(DimensionMismatch("")) end
if ldb < n throw(DimensionMismatch("")) end
m1, n1 = size(C)
if m != m1 || n != n1 throw(DimensionMismatch("")) end
ldc = max(1, stride(C, 2))
Expand Down

0 comments on commit 80abe17

Please sign in to comment.