diff --git a/stdlib/LinearAlgebra/src/blas.jl b/stdlib/LinearAlgebra/src/blas.jl index 30369ad335be1..272f0f57bdb29 100644 --- a/stdlib/LinearAlgebra/src/blas.jl +++ b/stdlib/LinearAlgebra/src/blas.jl @@ -704,10 +704,10 @@ for (fname, elty) in ((:dgemv_,:Float64), ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Clong), trans, size(A,1), size(A,2), alpha, A, max(1,stride(A,2)), X, stride(X,1), - beta, Y, stride(Y,1)) + beta, Y, stride(Y,1), 1) Y end function gemv(trans::AbstractChar, alpha::($elty), A::AbstractMatrix{$elty}, X::AbstractVector{$elty}) @@ -785,10 +785,10 @@ for (fname, elty) in ((:dgbmv_,:Float64), (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, - Ref{BlasInt}), + Ref{BlasInt}, Clong), trans, m, size(A,2), kl, ku, alpha, A, max(1,stride(A,2)), - x, stride(x,1), beta, y, stride(y,1)) + x, stride(x,1), beta, y, stride(y,1), 1) y end function gbmv(trans::AbstractChar, m::Integer, kl::Integer, ku::Integer, alpha::($elty), A::AbstractMatrix{$elty}, x::AbstractVector{$elty}) @@ -844,10 +844,10 @@ for (fname, elty, lib) in ((:dsymv_,:Float64,libblas), ccall((@blasfunc($fname), $lib), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, - Ptr{$elty}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Clong), uplo, n, alpha, A, max(1,stride(A,2)), x, stride(x,1), beta, - y, stride(y,1)) + y, stride(y,1), 1) y end function symv(uplo::AbstractChar, alpha::($elty), A::AbstractMatrix{$elty}, x::AbstractVector{$elty}) @@ -908,10 +908,10 @@ for (fname, elty) in ((:zhemv_,:ComplexF64), ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, - Ptr{$elty}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Clong), uplo, n, α, A, lda, x, incx, β, - y, incy) + y, incy, 1) y end function hemv(uplo::AbstractChar, α::($elty), A::AbstractMatrix{$elty}, x::AbstractVector{$elty}) @@ -971,7 +971,8 @@ for (fname, elty) in ((:zhpmv_, :ComplexF64), Ref{BlasInt}, # incx, Ref{$elty}, # β, Ptr{$elty}, # y, output - Ref{BlasInt}), # incy + Ref{BlasInt}, # incy + Clong), # length of uplo uplo, n, α, @@ -980,7 +981,8 @@ for (fname, elty) in ((:zhpmv_, :ComplexF64), incx, β, y, - incy) + incy, + 1) return y end end @@ -1041,10 +1043,10 @@ for (fname, elty) in ((:dsbmv_,:Float64), ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Clong), uplo, size(A,2), k, alpha, A, max(1,stride(A,2)), x, stride(x,1), - beta, y, stride(y,1)) + beta, y, stride(y,1), 1) y end function sbmv(uplo::AbstractChar, k::Integer, alpha::($elty), A::AbstractMatrix{$elty}, x::AbstractVector{$elty}) @@ -1119,7 +1121,8 @@ for (fname, elty) in ((:dspmv_, :Float64), Ref{BlasInt}, # incx, Ref{$elty}, # β, Ptr{$elty}, # y, out - Ref{BlasInt}), # incy + Ref{BlasInt}, # incy + Clong), # length of uplo uplo, n, α, @@ -1128,7 +1131,8 @@ for (fname, elty) in ((:dspmv_, :Float64), incx, β, y, - incy) + incy, + 1) return y end end @@ -1189,10 +1193,10 @@ for (fname, elty) in ((:zhbmv_,:ComplexF64), ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Clong), uplo, size(A,2), k, alpha, A, max(1,stride(A,2)), x, stride(x,1), - beta, y, stride(y,1)) + beta, y, stride(y,1), 1) y end function hbmv(uplo::AbstractChar, k::Integer, alpha::($elty), A::AbstractMatrix{$elty}, x::AbstractVector{$elty}) @@ -1248,9 +1252,10 @@ for (fname, elty) in ((:dtrmv_,:Float64), chkstride1(A) ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Clong, Clong, Clong), uplo, trans, diag, n, - A, max(1,stride(A,2)), x, max(1,stride(x, 1))) + A, max(1,stride(A,2)), x, max(1,stride(x, 1)), 1, 1, 1) x end function trmv(uplo::AbstractChar, trans::AbstractChar, diag::AbstractChar, A::AbstractMatrix{$elty}, x::AbstractVector{$elty}) @@ -1302,9 +1307,10 @@ for (fname, elty) in ((:dtrsv_,:Float64), chkstride1(A) ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Clong, Clong, Clong), uplo, trans, diag, n, - A, max(1,stride(A,2)), x, stride(x, 1)) + A, max(1,stride(A,2)), x, stride(x, 1), 1, 1, 1) x end function trsv(uplo::AbstractChar, trans::AbstractChar, diag::AbstractChar, A::AbstractMatrix{$elty}, x::AbstractVector{$elty}) @@ -1398,9 +1404,9 @@ for (fname, elty, relty) in ((:zher_,:ComplexF64, :Float64), end ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{$relty}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Clong), uplo, n, α, x, - stride(x, 1), A, max(1,stride(A,2))) + stride(x, 1), A, max(1,stride(A,2)), 1) A end end @@ -1453,11 +1459,11 @@ for (gemm, elty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, - Ref{BlasInt}), + Ref{BlasInt}, Clong, Clong), transA, transB, m, n, ka, alpha, A, max(1,stride(A,2)), B, max(1,stride(B,2)), beta, C, - max(1,stride(C,2))) + max(1,stride(C,2)), 1, 1) C end function gemm(transA::AbstractChar, transB::AbstractChar, alpha::($elty), A::AbstractMatrix{$elty}, B::AbstractMatrix{$elty}) @@ -1515,10 +1521,12 @@ for (mfname, elty) in ((:dsymm_,:Float64), ccall((@blasfunc($mfname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, + Clong, Clong), side, uplo, m, n, alpha, A, max(1,stride(A,2)), B, - max(1,stride(B,2)), beta, C, max(1,stride(C,2))) + max(1,stride(B,2)), beta, C, max(1,stride(C,2)), + 1, 1) C end function symm(side::AbstractChar, uplo::AbstractChar, alpha::($elty), A::AbstractMatrix{$elty}, B::AbstractMatrix{$elty}) @@ -1586,10 +1594,12 @@ for (mfname, elty) in ((:zhemm_,:ComplexF64), ccall((@blasfunc($mfname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, + Clong, Clong), side, uplo, m, n, alpha, A, max(1,stride(A,2)), B, - max(1,stride(B,2)), beta, C, max(1,stride(C,2))) + max(1,stride(B,2)), beta, C, max(1,stride(C,2)), + 1, 1) C end function hemm(side::AbstractChar, uplo::AbstractChar, alpha::($elty), A::AbstractMatrix{$elty}, B::AbstractMatrix{$elty}) @@ -1673,10 +1683,10 @@ for (fname, elty) in ((:dsyrk_,:Float64), ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, - Ptr{$elty}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Clong, Clong), uplo, trans, n, k, alpha, A, max(1,stride(A,2)), beta, - C, max(1,stride(C,2))) + C, max(1,stride(C,2)), 1, 1) C end end @@ -1731,10 +1741,10 @@ for (fname, elty, relty) in ((:zherk_, :ComplexF64, :Float64), ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$relty}, Ptr{$elty}, Ref{BlasInt}, Ref{$relty}, - Ptr{$elty}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Clong, Clong), uplo, trans, n, k, α, A, max(1,stride(A,2)), β, - C, max(1,stride(C,2))) + C, max(1,stride(C,2)), 1, 1) C end function herk(uplo::AbstractChar, trans::AbstractChar, α::$relty, A::AbstractVecOrMat{$elty}) @@ -1774,10 +1784,10 @@ for (fname, elty) in ((:dsyr2k_,:Float64), ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, - Ptr{$elty}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Clong, Clong), uplo, trans, n, k, alpha, A, max(1,stride(A,2)), B, max(1,stride(B,2)), beta, - C, max(1,stride(C,2))) + C, max(1,stride(C,2)), 1, 1) C end end @@ -1841,10 +1851,10 @@ for (fname, elty1, elty2) in ((:zher2k_,:ComplexF64,:Float64), (:cher2k_,:Comple ccall((@blasfunc($fname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty1}, Ptr{$elty1}, Ref{BlasInt}, Ptr{$elty1}, Ref{BlasInt}, - Ref{$elty2}, Ptr{$elty1}, Ref{BlasInt}), + Ref{$elty2}, Ptr{$elty1}, Ref{BlasInt}, Clong, Clong), uplo, trans, n, k, alpha, A, max(1,stride(A,2)), B, max(1,stride(B,2)), - beta, C, max(1,stride(C,2))) + beta, C, max(1,stride(C,2)), 1, 1) C end function her2k(uplo::AbstractChar, trans::AbstractChar, alpha::($elty1), A::AbstractVecOrMat{$elty1}, B::AbstractVecOrMat{$elty1}) @@ -1954,9 +1964,11 @@ for (mmname, smname, elty) in chkstride1(B) ccall((@blasfunc($mmname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, - Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Clong, Clong, Clong, Clong), side, uplo, transa, diag, m, n, - alpha, A, max(1,stride(A,2)), B, max(1,stride(B,2))) + alpha, A, max(1,stride(A,2)), B, max(1,stride(B,2)), + 1, 1, 1, 1) B end function trmm(side::AbstractChar, uplo::AbstractChar, transa::AbstractChar, diag::AbstractChar, @@ -1983,10 +1995,12 @@ for (mmname, smname, elty) in ccall((@blasfunc($smname), libblas), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Clong, Clong, Clong, Clong), side, uplo, transa, diag, m, n, alpha, A, - max(1,stride(A,2)), B, max(1,stride(B,2))) + max(1,stride(A,2)), B, max(1,stride(B,2)), + 1, 1, 1, 1) B end function trsm(side::AbstractChar, uplo::AbstractChar, transa::AbstractChar, diag::AbstractChar, alpha::$elty, A::AbstractMatrix{$elty}, B::AbstractMatrix{$elty}) diff --git a/stdlib/LinearAlgebra/src/lapack.jl b/stdlib/LinearAlgebra/src/lapack.jl index 54cf7a3f8ddaa..b7bfd6060ce7c 100644 --- a/stdlib/LinearAlgebra/src/lapack.jl +++ b/stdlib/LinearAlgebra/src/lapack.jl @@ -173,9 +173,9 @@ for (gbtrf, gbtrs, elty) in ccall((@blasfunc($gbtrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong), trans, n, kl, ku, size(B,2), AB, max(1,stride(AB,2)), ipiv, - B, max(1,stride(B,2)), info) + B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -226,8 +226,8 @@ for (gebal, gebak, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($gebal), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - job, n, A, max(1,stride(A,2)), ilo, ihi, scale, info) + Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, Clong), + job, n, A, max(1,stride(A,2)), ilo, ihi, scale, info, 1) chklapackerror(info[]) ilo[], ihi[], scale end @@ -249,8 +249,10 @@ for (gebal, gebak, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($gebak), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, - Ptr{$relty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - job, side, size(V,1), ilo, ihi, scale, n, V, max(1,stride(V,2)), info) + Ptr{$relty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Clong, Clong), + job, side, size(V,1), ilo, ihi, scale, n, V, max(1,stride(V,2)), info, + 1, 1) chklapackerror(info[]) V end @@ -888,11 +890,11 @@ for (tzrzf, ormrz, elty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), side, trans, m, n, k, l, A, lda, tau, C, ldc, work, - lwork, info) + lwork, info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -952,9 +954,9 @@ for (gels, gesv, getrs, getri, elty) in ccall((@blasfunc($gels), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), (btrn ? 'T' : 'N'), m, n, size(B,2), A, max(1,stride(A,2)), - B, max(1,stride(B,2)), work, lwork, info) + B, max(1,stride(B,2)), work, lwork, info, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -1017,8 +1019,8 @@ for (gels, gesv, getrs, getri, elty) in info = Ref{BlasInt}() ccall((@blasfunc($getrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - trans, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + trans, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -1142,9 +1144,9 @@ for (gesvx, elty) in Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{UInt8}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Clong, Clong, Clong), fact, trans, n, nrhs, A, lda, AF, ldaf, ipiv, equed, R, C, B, - ldb, X, n, rcond, ferr, berr, work, iwork, info) + ldb, X, n, rcond, ferr, berr, work, iwork, info, 1, 1, 1) chklapackerror(info[]) if info[] == n + 1 @warn "Matrix is singular to working precision" @@ -1212,9 +1214,9 @@ for (gesvx, elty, relty) in Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{UInt8}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$relty}, - Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}, Clong, Clong, Clong), fact, trans, n, nrhs, A, lda, AF, ldaf, ipiv, equed, R, C, B, - ldb, X, n, rcond, ferr, berr, work, rwork, info) + ldb, X, n, rcond, ferr, berr, work, rwork, info, 1, 1, 1) chklapackerror(info[]) if info[] == n + 1 @warn "Matrix is singular to working precision" @@ -1589,17 +1591,17 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$relty}, Ptr{BlasInt}), + Ptr{$relty}, Ptr{BlasInt}, Clong, Clong), jobvl, jobvr, n, A, max(1,stride(A,2)), W, VL, n, VR, n, - work, lwork, rwork, info) + work, lwork, rwork, info, 1, 1) else ccall((@blasfunc($geev), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), jobvl, jobvr, n, A, max(1,stride(A,2)), WR, WI, VL, n, - VR, n, work, lwork, info) + VR, n, work, lwork, info, 1, 1) end chklapackerror(info[]) if i == 1 @@ -1653,17 +1655,17 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$relty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{$relty}, Ptr{BlasInt}, Ptr{BlasInt}, Clong), job, m, n, A, max(1,stride(A,2)), S, U, max(1,stride(U,2)), VT, max(1,stride(VT,2)), - work, lwork, rwork, iwork, info) + work, lwork, rwork, iwork, info, 1) else ccall((@blasfunc($gesdd), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{BlasInt}, Ptr{BlasInt}, Clong), job, m, n, A, max(1,stride(A,2)), S, U, max(1,stride(U,2)), VT, max(1,stride(VT,2)), - work, lwork, iwork, info) + work, lwork, iwork, info, 1) end chklapackerror(info[]) if i == 1 @@ -1722,17 +1724,17 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, Clong, Clong), jobu, jobvt, m, n, A, max(1,stride(A,2)), S, U, max(1,stride(U,2)), VT, max(1,stride(VT,2)), - work, lwork, rwork, info) + work, lwork, rwork, info, 1, 1) else ccall((@blasfunc($gesvd), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), jobu, jobvt, m, n, A, max(1,stride(A,2)), S, U, max(1,stride(U,2)), VT, max(1,stride(VT,2)), - work, lwork, info) + work, lwork, info, 1, 1) end chklapackerror(info[]) if i == 1 @@ -1804,13 +1806,15 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}, Ptr{BlasInt}, + Clong, Clong, Clong), jobu, jobv, jobq, m, n, p, k, l, A, lda, B, ldb, alpha, beta, U, ldu, V, ldv, Q, ldq, - work, rwork, iwork, info) + work, rwork, iwork, info, + 1, 1, 1) else ccall((@blasfunc($ggsvd), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, @@ -1818,13 +1822,15 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, + Clong, Clong, Clong), jobu, jobv, jobq, m, n, p, k, l, A, lda, B, ldb, alpha, beta, U, ldu, V, ldv, Q, ldq, - work, iwork, info) + work, iwork, info, + 1, 1, 1) end chklapackerror(info[]) if m - k[1] - l[1] >= 0 @@ -1924,13 +1930,15 @@ for (f, elty) in ((:dggsvd3_, :Float64), Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, + Clong, Clong, Clong), jobu, jobv, jobq, m, n, p, k, l, A, lda, B, ldb, alpha, beta, U, ldu, V, ldv, Q, ldq, - work, lwork, iwork, info) + work, lwork, iwork, info, + 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -1983,14 +1991,14 @@ for (f, elty, relty) in ((:zggsvd3_, :ComplexF64, :Float64), Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong, Clong), jobu, jobv, jobq, m, n, p, k, l, A, lda, B, ldb, alpha, beta, U, ldu, V, ldv, Q, ldq, work, lwork, rwork, iwork, - info) + info, 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -2090,13 +2098,15 @@ for (geevx, ggev, elty) in Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + Clong, Clong, Clong, Clong), balanc, jobvl, jobvr, sense, n, A, lda, wr, wi, VL, max(1,ldvl), VR, max(1,ldvr), ilo, ihi, scale, abnrm, rconde, rcondv, work, - lwork, iwork, info) + lwork, iwork, info, + 1, 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -2155,12 +2165,12 @@ for (geevx, ggev, elty) in Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong), jobvl, jobvr, n, A, lda, B, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, - info) + info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -2236,13 +2246,13 @@ for (geevx, ggev, elty, relty) in Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$relty}, Ptr{BlasInt}), + Ptr{$relty}, Ptr{BlasInt}, Clong, Clong, Clong, Clong), balanc, jobvl, jobvr, sense, n, A, lda, w, VL, max(1,ldvl), VR, max(1,ldvr), ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, - rwork, info) + rwork, info, 1, 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -2302,12 +2312,12 @@ for (geevx, ggev, elty, relty) in Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong), jobvl, jobvr, n, A, lda, B, ldb, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, - info) + info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -2509,8 +2519,8 @@ for (gtsv, gttrf, gttrs, elty) in ccall((@blasfunc($gttrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - trans, n, size(B,2), dl, d, du, du2, ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + trans, n, size(B,2), dl, d, du, du2, ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -2731,9 +2741,9 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in ccall((@blasfunc($ormlq), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), side, trans, m, n, k, A, max(1,stride(A,2)), tau, - C, max(1,stride(C,2)), work, lwork, info) + C, max(1,stride(C,2)), work, lwork, info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -2779,11 +2789,11 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong), side, trans, m, n, k, A, max(1,stride(A,2)), tau, C, max(1, stride(C,2)), work, lwork, - info) + info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -2829,11 +2839,11 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong), side, trans, m, n, k, A, max(1,stride(A,2)), tau, C, max(1, stride(C,2)), work, lwork, - info) + info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -2878,9 +2888,9 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in ccall((@blasfunc($ormrq), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), side, trans, m, n, k, A, max(1,stride(A,2)), tau, - C, max(1,stride(C,2)), work, lwork, info) + C, max(1,stride(C,2)), work, lwork, info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -2935,11 +2945,11 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{BlasInt}, Clong, Clong), side, trans, m, n, k, nb, V, ldv, T, max(1,stride(T,2)), C, max(1,ldc), - work, info) + work, info, 1, 1) chklapackerror(info[]) return C end @@ -3052,8 +3062,8 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in info = Ref{BlasInt}() ccall((@blasfunc($posv), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), A, max(1,stride(A,2)), B, max(1,stride(B,2)), info) + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), A, max(1,stride(A,2)), B, max(1,stride(B,2)), info, 1) chkargsok(info[]) chkposdef(info[]) A, B @@ -3076,8 +3086,8 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in end info = Ref{BlasInt}() ccall((@blasfunc($potrf), liblapack), Cvoid, - (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, size(A,1), A, lda, info) + (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, size(A,1), A, lda, info, 1) chkargsok(info[]) #info[] > 0 means the leading minor of order info[] is not positive definite #ordinarily, throw Exception here, but return error code here @@ -3097,8 +3107,8 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in chkuplo(uplo) info = Ref{BlasInt}() ccall((@blasfunc($potri), liblapack), Cvoid, - (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, size(A,1), A, max(1,stride(A,2)), info) + (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, size(A,1), A, max(1,stride(A,2)), info, 1) chkargsok(info[]) chknonsingular(info[]) A @@ -3127,9 +3137,9 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in info = Ref{BlasInt}() ccall((@blasfunc($potrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), uplo, n, nrhs, A, - lda, B, ldb, info) + lda, B, ldb, info, 1) chklapackerror(info[]) return B end @@ -3152,8 +3162,8 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in info = Ref{BlasInt}() ccall((@blasfunc($pstrf), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ref{$rtyp}, Ptr{$rtyp}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), piv, rank, tol, work, info) + Ptr{BlasInt}, Ref{$rtyp}, Ptr{$rtyp}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), piv, rank, tol, work, info, 1) chkargsok(info[]) A, piv, rank[1], info[] #Stored in CholeskyPivoted end @@ -3343,8 +3353,8 @@ for (pttrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($pttrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$relty}, Ptr{$elty}, - Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), D, E, B, max(1,stride(B,2)), info) + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), D, E, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -3382,8 +3392,8 @@ for (trtri, trtrs, elty) in info = Ref{BlasInt}() ccall((@blasfunc($trtri), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}), - uplo, diag, n, A, lda, info) + Ptr{BlasInt}, Clong, Clong), + uplo, diag, n, A, lda, info, 1, 1) chklapackerror(info[]) A end @@ -3408,9 +3418,11 @@ for (trtri, trtrs, elty) in info = Ref{BlasInt}() ccall((@blasfunc($trtrs), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Clong, Clong, Clong), uplo, trans, diag, n, size(B,2), A, max(1,stride(A,2)), - B, max(1,stride(B,2)), info) + B, max(1,stride(B,2)), info, + 1, 1, 1) chklapackerror(info[]) B end @@ -3463,9 +3475,11 @@ for (trcon, trevc, trrfs, elty) in info = Ref{BlasInt}() ccall((@blasfunc($trcon), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, + Clong, Clong, Clong), norm, uplo, diag, n, - A, max(1,stride(A,2)), rcond, work, iwork, info) + A, max(1,stride(A,2)), rcond, work, iwork, info, + 1, 1, 1) chklapackerror(info[]) rcond[] end @@ -3503,12 +3517,12 @@ for (trcon, trevc, trrfs, elty) in ccall((@blasfunc($trevc), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt},Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ptr{BlasInt}, Clong, Clong), side, howmny, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, m, - work, info) + work, info, 1, 1) chklapackerror(info[]) #Decide what exactly to return @@ -3560,10 +3574,10 @@ for (trcon, trevc, trrfs, elty) in ccall((@blasfunc($trrfs), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Clong, Clong, Clong), uplo, trans, diag, n, nrhs, A, max(1,stride(A,2)), B, max(1,stride(B,2)), X, max(1,stride(X,2)), - Ferr, Berr, work, iwork, info) + Ferr, Berr, work, iwork, info, 1, 1, 1) chklapackerror(info[]) Ferr, Berr end @@ -3594,9 +3608,11 @@ for (trcon, trevc, trrfs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($trcon), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ref{$relty}, Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ref{$relty}, Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}, + Clong, Clong, Clong), norm, uplo, diag, n, - A, max(1,stride(A,2)), rcond, work, rwork, info) + A, max(1,stride(A,2)), rcond, work, rwork, info, + 1, 1, 1) chklapackerror(info[]) rcond[] end @@ -3636,11 +3652,11 @@ for (trcon, trevc, trrfs, elty, relty) in (Ref{UInt8}, Ref{UInt8}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}, Clong, Clong), side, howmny, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, m, - work, rwork, info) + work, rwork, info, 1, 1) chklapackerror(info[]) #Decide what exactly to return @@ -3692,10 +3708,10 @@ for (trcon, trevc, trrfs, elty, relty) in ccall((@blasfunc($trrfs), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}), + Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}, Clong, Clong, Clong), uplo, trans, diag, n, nrhs, A, max(1,stride(A,2)), B, max(1,stride(B,2)), X, max(1,stride(X,2)), - Ferr, Berr, work, rwork, info) + Ferr, Berr, work, rwork, info, 1, 1, 1) chklapackerror(info[]) Ferr, Berr end @@ -3762,8 +3778,8 @@ for (stev, stebz, stegr, stein, elty) in info = Ref{BlasInt}() ccall((@blasfunc($stev), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - job, n, dv, ev, Zmat, n, work, info) + Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong), + job, n, dv, ev, Zmat, n, work, info, 1) chklapackerror(info[]) dv, Zmat end @@ -3793,12 +3809,12 @@ for (stev, stebz, stegr, stein, elty) in Ref{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{BlasInt}, Ptr{BlasInt}, Clong, Clong), range, order, n, vl, vu, il, iu, abstol, dv, ev, m, nsplit, w, iblock, isplit, work, - iwork, info) + iwork, info, 1, 1) chklapackerror(info[]) w[1:m[]], iblock[1:m[]], isplit[1:nsplit[1]] end @@ -3834,12 +3850,14 @@ for (stev, stebz, stegr, stein, elty) in Ptr{$elty}, Ref{$elty}, Ref{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, + Clong, Clong), jobz, range, n, dv, eev, vl, vu, il, iu, abstol, m, w, Z, ldz, isuppz, work, - lwork, iwork, liwork, info) + lwork, iwork, liwork, info, + 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -3977,8 +3995,8 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in info = Ref{BlasInt}() ccall((@blasfunc($syconv), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, 'C', n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong, Clong), + uplo, 'C', n, A, max(1,stride(A,2)), ipiv, work, info, 1, 1) chklapackerror(info[]) A, work end @@ -4006,9 +4024,9 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), - work, lwork, info) + work, lwork, info, 1) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -4040,8 +4058,8 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, A, stride(A,2), ipiv, work, lwork, info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, A, stride(A,2), ipiv, work, lwork, info, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4068,8 +4086,8 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in # for i in 1:2 # ccall((@blasfunc($sytri), liblapack), Cvoid, # (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, -# Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), -# &uplo, &n, A, &max(1,stride(A,2)), ipiv, work, &lwork, info) +# Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Clong), +# &uplo, &n, A, &max(1,stride(A,2)), ipiv, work, &lwork, info, 1) # @assertargsok # chknonsingular(info[]) # if lwork < 0 @@ -4095,8 +4113,8 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, info, 1) chkargsok(info[]) chknonsingular(info[]) A @@ -4122,8 +4140,8 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -4158,9 +4176,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), - work, lwork, info) + work, lwork, info, 1) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -4192,8 +4210,8 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, A, stride(A,2), ipiv, work, lwork, info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, A, stride(A,2), ipiv, work, lwork, info, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4218,8 +4236,8 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, info, 1) chkargsok(info[]) chknonsingular(info[]) A @@ -4245,8 +4263,8 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -4285,9 +4303,11 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in ccall((@blasfunc($syconvf), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, + Clong, Clong), uplo, way, n, A, - lda, e, ipiv, info) + lda, e, ipiv, info, + 1, 1) chklapackerror(info[]) return A, e @@ -4318,8 +4338,8 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($syconv), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, 'C', n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong, Clong), + uplo, 'C', n, A, max(1,stride(A,2)), ipiv, work, info, 1, 1) chklapackerror(info[]) A, work end @@ -4347,9 +4367,9 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hesv), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), - work, lwork, info) + work, lwork, info, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4378,8 +4398,8 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in for i in 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hetrf), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4407,8 +4427,8 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in # for i in 1:2 # ccall((@blasfunc($hetri), liblapack), Cvoid, # (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, -# Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), -# &uplo, &n, A, &max(1,stride(A,2)), ipiv, work, &lwork, info) +# Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Clong), +# &uplo, &n, A, &max(1,stride(A,2)), ipiv, work, &lwork, info, 1) # chklapackerror(info[]) # if lwork < 0 # lwork = BlasInt(real(work[1])) @@ -4435,8 +4455,8 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($hetri), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, info, 1) chklapackerror(info[]) A end @@ -4460,8 +4480,8 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($hetrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -4495,9 +4515,9 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hesv), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), - work, lwork, info) + work, lwork, info, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4526,8 +4546,8 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in for i in 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hetrf), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4553,8 +4573,8 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($hetri), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, info, 1) chklapackerror(info[]) A end @@ -4578,8 +4598,8 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($hetrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -4614,9 +4634,9 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), - work, lwork, info) + work, lwork, info, 1) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -4649,8 +4669,8 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4678,8 +4698,8 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in # for i in 1:2 # ccall((@blasfunc($sytri), liblapack), Cvoid, # (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, -# Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), -# &uplo, &n, A, &max(1,stride(A,2)), ipiv, work, &lwork, info) +# Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Clong), +# &uplo, &n, A, &max(1,stride(A,2)), ipiv, work, &lwork, info, 1) # chklapackerror(info[]) # if lwork < 0 # lwork = BlasInt(real(work[1])) @@ -4705,8 +4725,8 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, info, 1) chklapackerror(info[]) A end @@ -4731,8 +4751,8 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -4767,9 +4787,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), - work, lwork, info) + work, lwork, info, 1) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -4802,8 +4822,8 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, lwork, info, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4829,8 +4849,8 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - uplo, n, A, max(1,stride(A,2)), ipiv, work, info) + Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1,stride(A,2)), ipiv, work, info, 1) chklapackerror(info[]) A end @@ -4855,8 +4875,8 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) + Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info, 1) chklapackerror(info[]) B end @@ -4897,9 +4917,11 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in ccall((@blasfunc($syconvf), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, + Clong, Clong), uplo, way, n, A, - max(1, lda), e, ipiv, info) + max(1, lda), e, ipiv, info, + 1, 1) chklapackerror(info[]) return A, e @@ -5028,8 +5050,8 @@ for (syev, syevr, sygvd, elty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($syev), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - jobz, uplo, n, A, max(1,stride(A,2)), W, work, lwork, info) + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), + jobz, uplo, n, A, max(1,stride(A,2)), W, work, lwork, info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5083,13 +5105,13 @@ for (syev, syevr, sygvd, elty) in Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong, Clong), jobz, range, uplo, n, A, max(1,lda), vl, vu, il, iu, abstol, m, w, Z, max(1,ldz), isuppz, work, lwork, iwork, liwork, - info) + info, 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5132,11 +5154,11 @@ for (syev, syevr, sygvd, elty) in (Ref{BlasInt}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, - Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, iwork, - liwork, info) + liwork, info, 1, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -5174,8 +5196,10 @@ for (syev, syevr, sygvd, elty, relty) in for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($syev), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - jobz, uplo, n, A, stride(A,2), W, work, lwork, rwork, info) + Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, + Clong, Clong), + jobz, uplo, n, A, stride(A,2), W, work, lwork, rwork, info, + 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5233,13 +5257,15 @@ for (syev, syevr, sygvd, elty, relty) in Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ref{BlasInt}, - Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}), + Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, + Clong, Clong, Clong), jobz, range, uplo, n, A, lda, vl, vu, il, iu, abstol, m, w, Z, ldz, isuppz, work, lwork, rwork, lrwork, - iwork, liwork, info) + iwork, liwork, info, + 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5286,11 +5312,13 @@ for (syev, syevr, sygvd, elty, relty) in (Ref{BlasInt}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, - Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, + Clong, Clong), itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, rwork, - lrwork, iwork, liwork, info) + lrwork, iwork, liwork, info, + 1, 1) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5385,11 +5413,11 @@ for (bdsqr, relty, elty) in (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, Clong), uplo, n, ncvt, nru, ncc, d, e_, Vt, ldvt, U, ldu, C, - ldc, work, info) + ldc, work, info, 1) chklapackerror(info[]) d, Vt, U, C #singular values in descending order, P**T * VT, U * Q, Q**T * C end @@ -5455,10 +5483,12 @@ for (bdsdc, elty) in ccall((@blasfunc($bdsdc), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, + Clong, Clong), uplo, compq, n, d, e_, u, ldu, vt, ldvt, - q, iq, work, iwork, info) + q, iq, work, iwork, info, + 1, 1) chklapackerror(info[]) d, e_, u, vt, q, iq end @@ -5505,9 +5535,9 @@ for (gecon, elty) in ccall((@blasfunc($gecon), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ref{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong), normtype, n, A, lda, anorm, rcond, work, iwork, - info) + info, 1) chklapackerror(info[]) rcond[] end @@ -5539,9 +5569,9 @@ for (gecon, elty, relty) in ccall((@blasfunc($gecon), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$relty}, Ref{$relty}, Ptr{$elty}, Ptr{$relty}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong), normtype, n, A, lda, anorm, rcond, work, rwork, - info) + info, 1) chklapackerror(info[]) rcond[] end @@ -5691,11 +5721,11 @@ for (ormhr, elty) in (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong), side, trans, mC, nC, ilo, ihi, A, max(1, stride(A, 2)), tau, C, max(1, stride(C, 2)), work, - lwork, info) + lwork, info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5736,8 +5766,8 @@ for (hetrd, elty) in ccall((@blasfunc($hetrd), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$relty}, - Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - uplo, n, A, max(1, stride(A, 2)), d, e, tau, work, lwork, info) + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Clong), + uplo, n, A, max(1, stride(A, 2)), d, e, tau, work, lwork, info, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5786,10 +5816,10 @@ for (orgtr, elty) in ccall((@blasfunc($orgtr), liblapack), Cvoid, (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong), uplo, n, A, max(1, stride(A, 2)), tau, work, lwork, - info) + info, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5845,11 +5875,11 @@ for (ormtr, elty) in (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{BlasInt}, Clong, Clong, Clong), side, uplo, trans, mC, nC, A, max(1, stride(A, 2)), tau, C, max(1, stride(C, 2)), work, - lwork, info) + lwork, info, 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5890,11 +5920,11 @@ for (gees, gges, elty) in (Ref{UInt8}, Ref{UInt8}, Ptr{Cvoid}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ref{BlasInt}, Ptr{Cvoid}, Ptr{BlasInt}), + Ref{BlasInt}, Ptr{Cvoid}, Ptr{BlasInt}, Clong, Clong), jobvs, 'N', C_NULL, n, A, max(1, stride(A, 2)), sdim, wr, wi, vs, ldvs, work, - lwork, C_NULL, info) + lwork, C_NULL, info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5937,13 +5967,13 @@ for (gees, gges, elty) in Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{Cvoid}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong, Clong), jobvsl, jobvsr, 'N', C_NULL, n, A, max(1,stride(A, 2)), B, max(1,stride(B, 2)), sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, C_NULL, - info) + info, 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5985,11 +6015,11 @@ for (gees, gges, elty, relty) in (Ref{UInt8}, Ref{UInt8}, Ptr{Cvoid}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$relty}, Ptr{Cvoid}, Ptr{BlasInt}), + Ptr{$relty}, Ptr{Cvoid}, Ptr{BlasInt}, Clong, Clong), jobvs, sort, C_NULL, n, A, max(1, stride(A, 2)), sdim, w, vs, ldvs, work, lwork, - rwork, C_NULL, info) + rwork, C_NULL, info, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -6033,13 +6063,13 @@ for (gees, gges, elty, relty) in Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{Cvoid}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong, Clong), jobvsl, jobvsr, 'N', C_NULL, n, A, max(1, stride(A, 2)), B, max(1, stride(B, 2)), sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, C_NULL, - info) + info, 1, 1, 1) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -6096,11 +6126,11 @@ for (trexc, trsen, tgsen, elty) in (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}), + Ptr{$elty}, Ptr{BlasInt}, Clong), compq, n, T, ldt, Q, ldq, ifst, ilst, - work, info) + work, info, 1) chklapackerror(info[]) T, Q end @@ -6139,12 +6169,12 @@ for (trexc, trsen, tgsen, elty) in Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong), job, compq, select, n, T, ldt, Q, ldq, wr, wi, m, s, sep, work, lwork, iwork, liwork, - info) + info, 1, 1) chklapackerror(info[]) if i == 1 # only estimated optimal lwork, liwork lwork = BlasInt(real(work[1])) @@ -6247,11 +6277,11 @@ for (trexc, trsen, tgsen, elty, relty) in (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong), compq, n, T, ldt, Q, ldq, ifst, ilst, - info) + info, 1) chklapackerror(info[]) T, Q end @@ -6286,12 +6316,12 @@ for (trexc, trsen, tgsen, elty, relty) in Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$relty}, Ref{$relty}, Ptr{$elty}, Ref{BlasInt}, - Ptr{BlasInt}), + Ptr{BlasInt}, Clong, Clong), job, compq, select, n, T, ldt, Q, ldq, w, m, s, sep, work, lwork, - info) + info, 1, 1) chklapackerror(info[]) if i == 1 # only estimated optimal lwork, liwork lwork = BlasInt(real(work[1])) @@ -6432,10 +6462,10 @@ for (fn, elty, relty) in ((:dtrsyl_, :Float64, :Float64), ccall((@blasfunc($fn), liblapack), Cvoid, (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, - Ptr{$relty}, Ptr{BlasInt}), + Ptr{$relty}, Ptr{BlasInt}, Clong, Clong), transa, transb, isgn, m, n, A, lda, B, ldb, C, ldc, - scale, info) + scale, info, 1, 1) chklapackerror(info[]) C, scale[1] end