diff --git a/base/boot.jl b/base/boot.jl index 222a9766ab2f4..dd5a425add0a9 100644 --- a/base/boot.jl +++ b/base/boot.jl @@ -331,17 +331,17 @@ VecElement(arg::T) where {T} = VecElement{T}(arg) # used by lowering of splicing unquote splicedexpr(hd::Symbol, args::Array{Any,1}) = (e=Expr(hd); e.args=args; e) -_new(typ::Symbol, argty::Symbol) = eval(Core, :((::Type{$typ})(@nospecialize n::$argty) = $(Expr(:new, typ, :n)))) +_new(typ::Symbol, argty::Symbol) = eval(Core, :($typ(@nospecialize n::$argty) = $(Expr(:new, typ, :n)))) _new(:LabelNode, :Int) _new(:GotoNode, :Int) _new(:NewvarNode, :SlotNumber) _new(:QuoteNode, :Any) _new(:SSAValue, :Int) -eval(Core, :((::Type{LineNumberNode})(l::Int) = $(Expr(:new, :LineNumberNode, :l, nothing)))) -eval(Core, :((::Type{LineNumberNode})(l::Int, @nospecialize(f)) = $(Expr(:new, :LineNumberNode, :l, :f)))) -eval(Core, :((::Type{GlobalRef})(m::Module, s::Symbol) = $(Expr(:new, :GlobalRef, :m, :s)))) -eval(Core, :((::Type{SlotNumber})(n::Int) = $(Expr(:new, :SlotNumber, :n)))) -eval(Core, :((::Type{TypedSlot})(n::Int, @nospecialize(t)) = $(Expr(:new, :TypedSlot, :n, :t)))) +eval(Core, :(LineNumberNode(l::Int) = $(Expr(:new, :LineNumberNode, :l, nothing)))) +eval(Core, :(LineNumberNode(l::Int, @nospecialize(f)) = $(Expr(:new, :LineNumberNode, :l, :f)))) +eval(Core, :(GlobalRef(m::Module, s::Symbol) = $(Expr(:new, :GlobalRef, :m, :s)))) +eval(Core, :(SlotNumber(n::Int) = $(Expr(:new, :SlotNumber, :n)))) +eval(Core, :(TypedSlot(n::Int, @nospecialize(t)) = $(Expr(:new, :TypedSlot, :n, :t)))) Module(name::Symbol=:anonymous, std_imports::Bool=true) = ccall(:jl_f_new_module, Ref{Module}, (Any, Bool), name, std_imports) diff --git a/base/deprecated.jl b/base/deprecated.jl index 8338f8a1c65b1..164a577cf3a13 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -556,7 +556,7 @@ function gen_broadcast_function_sparse(genbody::Function, f::Function, is_first_ body = genbody(f, is_first_sparse) @eval let local _F_ - function _F_{Tv,Ti}(B::SparseMatrixCSC{Tv,Ti}, A_1, A_2) + function _F_(B::SparseMatrixCSC{Tv,Ti}, A_1, A_2) where {Tv,Ti} $body end _F_ @@ -1263,11 +1263,11 @@ end @noinline zero_arg_matrix_constructor(prefix::String) = depwarn("$prefix() is deprecated, use $prefix(0, 0) instead.", :zero_arg_matrix_constructor) -function (::Type{Matrix{T}})() where T +function Matrix{T}() where T zero_arg_matrix_constructor("Matrix{T}") return Matrix{T}(0, 0) end -function (::Type{Matrix})() +function Matrix() zero_arg_matrix_constructor("Matrix") return Matrix(0, 0) end diff --git a/base/gmp.jl b/base/gmp.jl index 17a7f6602b27f..9abfc34d44610 100644 --- a/base/gmp.jl +++ b/base/gmp.jl @@ -346,7 +346,7 @@ function convert(::Type{T}, x::BigInt) where T<:Signed end -(::Type{Float64})(n::BigInt, ::RoundingMode{:ToZero}) = MPZ.get_d(n) +Float64(n::BigInt, ::RoundingMode{:ToZero}) = MPZ.get_d(n) function (::Type{T})(n::BigInt, ::RoundingMode{:ToZero}) where T<:Union{Float16,Float32} T(Float64(n,RoundToZero),RoundToZero) diff --git a/base/linalg/blas.jl b/base/linalg/blas.jl index 530413a0edcf2..0ed249b91a9d1 100644 --- a/base/linalg/blas.jl +++ b/base/linalg/blas.jl @@ -172,8 +172,8 @@ for (fname, elty) in ((:dcopy_,:Float64), # SUBROUTINE DCOPY(N,DX,INCX,DY,INCY) function blascopy!(n::Integer, DX::Union{Ptr{$elty},StridedArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},StridedArray{$elty}}, incy::Integer) ccall((@blasfunc($fname), libblas), Void, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &n, DX, &incx, DY, &incy) + (Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + n, DX, incx, DY, incy) DY end end @@ -203,8 +203,8 @@ for (fname, elty) in ((:dscal_,:Float64), # SUBROUTINE DSCAL(N,DA,DX,INCX) function scal!(n::Integer, DA::$elty, DX::Union{Ptr{$elty},DenseArray{$elty}}, incx::Integer) ccall((@blasfunc($fname), libblas), Void, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}), - &n, &DA, DX, &incx) + (Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + n, DA, DX, incx) DX end end @@ -267,8 +267,8 @@ for (fname, elty) in ((:ddot_,:Float64), # DOUBLE PRECISION DX(*),DY(*) function dot(n::Integer, DX::Union{Ptr{$elty},DenseArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},DenseArray{$elty}}, incy::Integer) ccall((@blasfunc($fname), libblas), $elty, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &n, DX, &incx, DY, &incy) + (Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + n, DX, incx, DY, incy) end end end @@ -359,8 +359,8 @@ for (fname, elty, ret_type) in ((:dnrm2_,:Float64,:Float64), # SUBROUTINE DNRM2(N,X,INCX) function nrm2(n::Integer, X::Union{Ptr{$elty},DenseArray{$elty}}, incx::Integer) ccall((@blasfunc($fname), libblas), $ret_type, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &n, X, &incx) + (Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + n, X, incx) end end end @@ -392,8 +392,8 @@ for (fname, elty, ret_type) in ((:dasum_,:Float64,:Float64), # SUBROUTINE ASUM(N, X, INCX) function asum(n::Integer, X::Union{Ptr{$elty},DenseArray{$elty}}, incx::Integer) ccall((@blasfunc($fname), libblas), $ret_type, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &n, X, &incx) + (Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + n, X, incx) end end end @@ -435,8 +435,8 @@ for (fname, elty) in ((:daxpy_,:Float64), # DOUBLE PRECISION DX(*),DY(*) function axpy!(n::Integer, alpha::($elty), dx::Union{Ptr{$elty}, DenseArray{$elty}}, incx::Integer, dy::Union{Ptr{$elty}, DenseArray{$elty}}, incy::Integer) ccall((@blasfunc($fname), libblas), Void, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &n, &alpha, dx, &incx, dy, &incy) + (Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + n, alpha, dx, incx, dy, incy) dy end end @@ -521,8 +521,8 @@ for (fname, elty) in ((:idamax_,:Float64), @eval begin function iamax(n::Integer, dx::Union{Ptr{$elty}, DenseArray{$elty}}, incx::Integer) ccall((@blasfunc($fname), libblas),BlasInt, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &n, dx, &incx) + (Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + n, dx, incx) end end end @@ -553,12 +553,12 @@ for (fname, elty) in ((:dgemv_,:Float64), throw(DimensionMismatch("A.' has dimensions $n, $m, X has length $(length(X)) and Y has length $(length(Y))")) end ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}), - &trans, &size(A,1), &size(A,2), &alpha, - A, &max(1,stride(A,2)), X, &stride(X,1), - &beta, Y, &stride(Y,1)) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + trans, size(A,1), size(A,2), alpha, + A, max(1,stride(A,2)), X, stride(X,1), + beta, Y, stride(Y,1)) Y end function gemv(trans::Char, alpha::($elty), A::StridedMatrix{$elty}, X::StridedVector{$elty}) @@ -628,13 +628,13 @@ for (fname, elty) in ((:dgbmv_,:Float64), # DOUBLE PRECISION A(LDA,*),X(*),Y(*) function gbmv!(trans::Char, m::Integer, kl::Integer, ku::Integer, alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}, beta::($elty), y::StridedVector{$elty}) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}), - &trans, &m, &size(A,2), &kl, - &ku, &alpha, A, &max(1,stride(A,2)), - x, &stride(x,1), &beta, y, &stride(y,1)) + (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}), + trans, m, size(A,2), kl, + ku, alpha, A, max(1,stride(A,2)), + x, stride(x,1), beta, y, stride(y,1)) y end function gbmv(trans::Char, m::Integer, kl::Integer, ku::Integer, alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}) @@ -684,12 +684,12 @@ for (fname, elty, lib) in ((:dsymv_,:Float64,libblas), throw(DimensionMismatch("A has size $(size(A)), and y has length $(length(y))")) end ccall((@blasfunc($fname), $lib), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}), - &uplo, &n, &alpha, A, - &max(1,stride(A,2)), x, &stride(x,1), &beta, - y, &stride(y,1)) + (Ref{UInt8}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, + Ptr{$elty}, Ref{BlasInt}), + uplo, n, alpha, A, + max(1,stride(A,2)), x, stride(x,1), beta, + y, stride(y,1)) y end function symv(uplo::Char, alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}) @@ -737,12 +737,12 @@ for (fname, elty) in ((:zhemv_,:Complex128), incx = stride(x, 1) incy = stride(y, 1) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}), - &uplo, &n, &α, A, - &lda, x, &incx, &β, - y, &incy) + (Ref{UInt8}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, + Ptr{$elty}, Ref{BlasInt}), + uplo, n, α, A, + lda, x, incx, β, + y, incy) y end function hemv(uplo::Char, α::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}) @@ -767,12 +767,12 @@ for (fname, elty) in ((:dsbmv_,:Float64), # DOUBLE PRECISION A(LDA,*),X(*),Y(*) function sbmv!(uplo::Char, k::Integer, alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}, beta::($elty), y::StridedVector{$elty}) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &size(A,2), &k, &alpha, - A, &max(1,stride(A,2)), x, &stride(x,1), - &beta, y, &stride(y,1)) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + uplo, size(A,2), k, alpha, + A, max(1,stride(A,2)), x, stride(x,1), + beta, y, stride(y,1)) y end function sbmv(uplo::Char, k::Integer, alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}) @@ -829,12 +829,12 @@ for (fname, elty) in ((:zhbmv_,:Complex128), # DOUBLE PRECISION A(LDA,*),X(*),Y(*) function hbmv!(uplo::Char, k::Integer, alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}, beta::($elty), y::StridedVector{$elty}) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &size(A,2), &k, &alpha, - A, &max(1,stride(A,2)), x, &stride(x,1), - &beta, y, &stride(y,1)) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + uplo, size(A,2), k, alpha, + A, max(1,stride(A,2)), x, stride(x,1), + beta, y, stride(y,1)) y end function hbmv(uplo::Char, k::Integer, alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty}) @@ -887,10 +887,10 @@ for (fname, elty) in ((:dtrmv_,:Float64), throw(DimensionMismatch("A has size ($n,$n), x has length $(length(x))")) end ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &trans, &diag, &n, - A, &max(1,stride(A,2)), x, &max(1,stride(x, 1))) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + uplo, trans, diag, n, + A, max(1,stride(A,2)), x, max(1,stride(x, 1))) x end function trmv(uplo::Char, trans::Char, diag::Char, A::StridedMatrix{$elty}, x::StridedVector{$elty}) @@ -939,10 +939,10 @@ for (fname, elty) in ((:dtrsv_,:Float64), throw(DimensionMismatch("size of A is $n != length(x) = $(length(x))")) end ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &trans, &diag, &n, - A, &max(1,stride(A,2)), x, &stride(x, 1)) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + uplo, trans, diag, n, + A, max(1,stride(A,2)), x, stride(x, 1)) x end function trsv(uplo::Char, trans::Char, diag::Char, A::StridedMatrix{$elty}, x::StridedVector{$elty}) @@ -971,12 +971,12 @@ for (fname, elty) in ((:dger_,:Float64), throw(DimensionMismatch("A has size ($m,$n), x has length $(length(x)), y has length $(length(y))")) end ccall((@blasfunc($fname), libblas), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}), - &m, &n, &α, x, - &stride(x, 1), y, &stride(y, 1), A, - &max(1,stride(A,2))) + (Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}), + m, n, α, x, + stride(x, 1), y, stride(y, 1), A, + max(1,stride(A,2))) A end end @@ -1003,10 +1003,10 @@ for (fname, elty, lib) in ((:dsyr_,:Float64,libblas), throw(DimensionMismatch("A has size ($n,$n), x has length $(length(x))")) end ccall((@blasfunc($fname), $lib), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &n, &α, x, - &stride(x, 1), A, &max(1,stride(A, 2))) + (Ref{UInt8}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + uplo, n, α, x, + stride(x, 1), A, max(1,stride(A, 2))) A end end @@ -1032,10 +1032,10 @@ for (fname, elty, relty) in ((:zher_,:Complex128, :Float64), throw(DimensionMismatch("A has size ($n,$n), x has length $(length(x))")) end ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &n, &α, x, - &stride(x, 1), A, &max(1,stride(A,2))) + (Ref{UInt8}, Ref{BlasInt}, Ref{$relty}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + uplo, n, α, x, + stride(x, 1), A, max(1,stride(A,2))) A end end @@ -1077,14 +1077,14 @@ for (gemm, elty) in throw(DimensionMismatch("A has size ($m,$ka), B has size ($kb,$n), C has size $(size(C))")) end ccall((@blasfunc($gemm), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}), - &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))) + (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}), + 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))) C end function gemm(transA::Char, transB::Char, alpha::($elty), A::StridedMatrix{$elty}, B::StridedMatrix{$elty}) @@ -1134,12 +1134,12 @@ for (mfname, elty) in ((:dsymm_,:Float64), throw(DimensionMismatch("B has second dimension $(size(B,2)) but needs to match second dimension of C, $n")) end ccall((@blasfunc($mfname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}), - &side, &uplo, &m, &n, - &alpha, A, &max(1,stride(A,2)), B, - &max(1,stride(B,2)), &beta, C, &max(1,stride(C,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + side, uplo, m, n, + alpha, A, max(1,stride(A,2)), B, + max(1,stride(B,2)), beta, C, max(1,stride(C,2))) C end function symm(side::Char, uplo::Char, alpha::($elty), A::StridedMatrix{$elty}, B::StridedMatrix{$elty}) @@ -1199,12 +1199,12 @@ for (mfname, elty) in ((:zhemm_,:Complex128), throw(DimensionMismatch("B has second dimension $(size(B,2)) but needs to match second dimension of C, $n")) end ccall((@blasfunc($mfname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}), - &side, &uplo, &m, &n, - &alpha, A, &max(1,stride(A,2)), B, - &max(1,stride(B,2)), &beta, C, &max(1,stride(C,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), + side, uplo, m, n, + alpha, A, max(1,stride(A,2)), B, + max(1,stride(B,2)), beta, C, max(1,stride(C,2))) C end function hemm(side::Char, uplo::Char, alpha::($elty), A::StridedMatrix{$elty}, B::StridedMatrix{$elty}) @@ -1257,12 +1257,12 @@ for (fname, elty) in ((:dsyrk_,:Float64), if nn != n throw(DimensionMismatch("C has size ($n,$n), corresponding dimension of A is $nn")) end k = size(A, trans == 'N' ? 2 : 1) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}), - &uplo, &trans, &n, &k, - &alpha, A, &max(1,stride(A,2)), &beta, - C, &max(1,stride(C,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, + Ptr{$elty}, Ref{BlasInt}), + uplo, trans, n, k, + alpha, A, max(1,stride(A,2)), beta, + C, max(1,stride(C,2))) C end end @@ -1313,12 +1313,12 @@ for (fname, elty, relty) in ((:zherk_, :Complex128, :Float64), end k = size(A, trans == 'N' ? 2 : 1) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, - Ptr{$elty}, Ptr{BlasInt}), - &uplo, &trans, &n, &k, - &α, A, &max(1,stride(A,2)), &β, - C, &max(1,stride(C,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ref{$relty}, Ptr{$elty}, Ref{BlasInt}, Ref{$relty}, + Ptr{$elty}, Ref{BlasInt}), + uplo, trans, n, k, + α, A, max(1,stride(A,2)), β, + C, max(1,stride(C,2))) C end function herk(uplo::Char, trans::Char, α::$relty, A::StridedVecOrMat{$elty}) @@ -1352,12 +1352,12 @@ for (fname, elty) in ((:dsyr2k_,:Float64), if nn != n throw(DimensionMismatch("C has size ($n,$n), corresponding dimension of A is $nn")) end k = size(A, trans == 'N' ? 2 : 1) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}), - &uplo, &trans, &n, &k, - &alpha, A, &max(1,stride(A,2)), B, &max(1,stride(B,2)), &beta, - C, &max(1,stride(C,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, + Ptr{$elty}, Ref{BlasInt}), + 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 end end @@ -1389,12 +1389,12 @@ for (fname, elty1, elty2) in ((:zher2k_,:Complex128,:Float64), (:cher2k_,:Comple if nn != n throw(DimensionMismatch("C has size ($n,$n), corresponding dimension of A is $nn")) end k = size(A, trans == 'N' ? 2 : 1) ccall((@blasfunc($fname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty1}, Ptr{$elty1}, Ptr{BlasInt}, Ptr{$elty1}, Ptr{BlasInt}, - Ptr{$elty2}, Ptr{$elty1}, Ptr{BlasInt}), - &uplo, &trans, &n, &k, - &alpha, A, &max(1,stride(A,2)), B, &max(1,stride(B,2)), - &beta, C, &max(1,stride(C,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ref{$elty1}, Ptr{$elty1}, Ref{BlasInt}, Ptr{$elty1}, Ref{BlasInt}, + Ref{$elty2}, Ptr{$elty1}, Ref{BlasInt}), + 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 end function her2k(uplo::Char, trans::Char, alpha::($elty1), A::StridedVecOrMat{$elty1}, B::StridedVecOrMat{$elty1}) @@ -1474,10 +1474,10 @@ for (mmname, smname, elty) in throw(DimensionMismatch("size of A, $(size(A)), doesn't match $side size of B with dims, $(size(B))")) end ccall((@blasfunc($mmname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &side, &uplo, &transa, &diag, &m, &n, - &alpha, A, &max(1,stride(A,2)), B, &max(1,stride(B,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + side, uplo, transa, diag, m, n, + alpha, A, max(1,stride(A,2)), B, max(1,stride(B,2))) B end function trmm(side::Char, uplo::Char, transa::Char, diag::Char, @@ -1499,12 +1499,12 @@ for (mmname, smname, elty) in throw(DimensionMismatch("size of A is ($k,$k), size of B is ($m,$n), side is $side, and transa='$transa'")) end ccall((@blasfunc($smname), libblas), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &side, &uplo, &transa, &diag, - &m, &n, &alpha, A, - &max(1,stride(A,2)), B, &max(1,stride(B,2))) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, + Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}), + side, uplo, transa, diag, + m, n, alpha, A, + max(1,stride(A,2)), B, max(1,stride(B,2))) B end function trsm(side::Char, uplo::Char, transa::Char, diag::Char, alpha::$elty, A::StridedMatrix{$elty}, B::StridedMatrix{$elty}) diff --git a/base/linalg/lapack.jl b/base/linalg/lapack.jl index c73ea95df6b4c..5e5a60982f660 100644 --- a/base/linalg/lapack.jl +++ b/base/linalg/lapack.jl @@ -122,9 +122,9 @@ for (gbtrf, gbtrs, elty) in ipiv = similar(AB, BlasInt, mnmn) info = Ref{BlasInt}() ccall((@blasfunc($gbtrf), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, &kl, &ku, AB, &max(1,stride(AB,2)), ipiv, info) + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), + m, n, kl, ku, AB, max(1,stride(AB,2)), ipiv, info) chklapackerror(info[]) AB, ipiv end @@ -147,11 +147,11 @@ for (gbtrf, gbtrs, elty) in throw(DimensionMismatch("matrix AB has dimensions $(size(AB)), but right hand side matrix B has dimensions $(size(B))")) end ccall((@blasfunc($gbtrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &trans, &n, &kl, &ku, &size(B,2), AB, &max(1,stride(AB,2)), ipiv, - B, &max(1,stride(B,2)), info) + trans, n, kl, ku, size(B,2), AB, max(1,stride(AB,2)), ipiv, + B, max(1,stride(B,2)), info) chklapackerror(info[]) B end @@ -201,9 +201,9 @@ for (gebal, gebak, elty, relty) in scale = similar(A, $relty, n) info = Ref{BlasInt}() ccall((@blasfunc($gebal), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + job, n, A, max(1,stride(A,2)), ilo, ihi, scale, info) chklapackerror(info[]) ilo[], ihi[], scale end @@ -223,9 +223,9 @@ for (gebal, gebak, elty, relty) in n = checksquare(V) info = Ref{BlasInt}() ccall((@blasfunc($gebak), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &job, &side, &size(V,1), &ilo, &ihi, scale, &n, V, &max(1,stride(V,2)), info) + (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) chklapackerror(info[]) V end @@ -287,12 +287,12 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gebrd), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &max(1,stride(A,2)), + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, A, max(1,stride(A,2)), d, e, tauq, taup, - work, &lwork, info) + work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -320,9 +320,9 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gelqf), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &lda, tau, work, &lwork, info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, A, lda, tau, work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -350,9 +350,9 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($geqlf), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &lda, tau, work, &lwork, info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, A, lda, tau, work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -391,20 +391,20 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty for i = 1:2 # first call returns lwork as work[1] if cmplx ccall((@blasfunc($geqp3), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - &m, &n, A, &lda, - jpvt, tau, work, &lwork, + m, n, A, lda, + jpvt, tau, work, lwork, rwork, info) else ccall((@blasfunc($geqp3), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &lda, + m, n, A, lda, jpvt, tau, work, - &lwork, info) + lwork, info) end chklapackerror(info[]) if i == 1 @@ -428,11 +428,11 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty if n > 0 info = Ref{BlasInt}() ccall((@blasfunc($geqrt), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &m, &n, &nb, A, - &lda, T, &max(1,stride(T,2)), work, + m, n, nb, A, + lda, T, max(1,stride(T,2)), work, info) chklapackerror(info[]) end @@ -453,10 +453,10 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty if n > 0 info = Ref{BlasInt}() ccall((@blasfunc($geqrt3), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &max(1, stride(A, 2)), - T, &max(1,stride(T,2)), info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, A, max(1, stride(A, 2)), + T, max(1,stride(T,2)), info) chklapackerror(info[]) end A, T @@ -479,9 +479,9 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($geqrf), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &max(1,stride(A,2)), tau, work, &lwork, info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, A, max(1,stride(A,2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -507,9 +507,9 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gerqf), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &max(1,stride(A,2)), tau, work, &lwork, info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, A, max(1,stride(A,2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -532,9 +532,9 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, geqrt, geqrt3, gerqf, getrf, elty, relty ipiv = similar(A, BlasInt, min(m,n)) info = Ref{BlasInt}() ccall((@blasfunc($getrf), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &lda, ipiv, info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), + m, n, A, lda, ipiv, info) chkargsok(info[]) A, ipiv, info[] #Error code is stored in LU factorization type end @@ -763,10 +763,10 @@ for (tzrzf, ormrz, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($tzrzf), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, A, &lda, - tau, work, &lwork, info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, A, lda, + tau, work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -800,14 +800,14 @@ for (tzrzf, ormrz, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ormrz), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}), - &side, &trans, &m, &n, - &k, &l, A, &lda, - tau, C, &ldc, work, - &lwork, info) + (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}), + side, trans, m, n, + k, l, A, lda, + tau, C, ldc, work, + lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -864,11 +864,11 @@ for (gels, gesv, getrs, getri, elty) in lwork = BlasInt(-1) for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gels), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &(btrn ? 'T' : 'N'), &m, &n, &size(B,2), A, &max(1,stride(A,2)), - B, &max(1,stride(B,2)), work, &lwork, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + (btrn ? 'T' : 'N'), m, n, size(B,2), A, max(1,stride(A,2)), + B, max(1,stride(B,2)), work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -904,9 +904,9 @@ for (gels, gesv, getrs, getri, elty) in ipiv = similar(A, BlasInt, n) info = Ref{BlasInt}() ccall((@blasfunc($gesv), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + n, size(B,2), A, max(1,stride(A,2)), ipiv, B, max(1,stride(B,2)), info) chklapackerror(info[]) B, A, ipiv end @@ -928,9 +928,9 @@ for (gels, gesv, getrs, getri, elty) in nrhs = size(B, 2) info = Ref{BlasInt}() ccall((@blasfunc($getrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &trans, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -953,9 +953,9 @@ for (gels, gesv, getrs, getri, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($getri), liblapack), Void, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &n, A, &lda, ipiv, work, &lwork, info) + (Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + n, A, lda, ipiv, work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -1048,13 +1048,13 @@ for (gesvx, elty) in info = Ref{BlasInt}() X = similar(A, $elty, n, nrhs) ccall((@blasfunc($gesvx), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{UInt8}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + 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}), - &fact, &trans, &n, &nrhs, A, &lda, AF, &ldaf, ipiv, &equed, R, C, B, - &ldb, X, &n, rcond, ferr, berr, work, iwork, info) + fact, trans, n, nrhs, A, lda, AF, ldaf, ipiv, equed, R, C, B, + ldb, X, n, rcond, ferr, berr, work, iwork, info) chklapackerror(info[]) if info[] == n + 1 warn("matrix is singular to working precision") @@ -1117,13 +1117,13 @@ for (gesvx, elty, relty) in info = Ref{BlasInt}() X = similar(A, $elty, n, nrhs) ccall((@blasfunc($gesvx), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{UInt8}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$relty}, + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + 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}), - &fact, &trans, &n, &nrhs, A, &lda, AF, &ldaf, ipiv, &equed, R, C, B, - &ldb, X, &n, rcond, ferr, berr, work, rwork, info) + fact, trans, n, nrhs, A, lda, AF, ldaf, ipiv, equed, R, C, B, + ldb, X, n, rcond, ferr, berr, work, rwork, info) chklapackerror(info[]) if info[] == n + 1 warn("matrix is singular to working precision") @@ -1212,14 +1212,14 @@ for (gelsd, gelsy, elty) in iwork = Vector{BlasInt}(1) for i = 1:2 # first call returns lwork as work[1] and iwork length as iwork[1] ccall((@blasfunc($gelsd), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{$elty}, Ref{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, &size(B,2), - A, &max(1,stride(A,2)), newB, &max(1,stride(B,2),n), + Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), + m, n, size(B,2), + A, max(1,stride(A,2)), newB, max(1,stride(B,2),n), s, $elty(rcond), rnk, work, - &lwork, iwork, info) + lwork, iwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -1257,13 +1257,13 @@ for (gelsd, gelsy, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gelsy), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ref{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ref{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &m, &n, &nrhs, A, - &lda, newB, &ldb, jpvt, - $elty(rcond), rnk, work, &lwork, + m, n, nrhs, A, + lda, newB, ldb, jpvt, + $elty(rcond), rnk, work, lwork, info) chklapackerror(info[]) if i == 1 @@ -1306,13 +1306,13 @@ for (gelsd, gelsy, elty, relty) in iwork = Vector{BlasInt}(1) for i = 1:2 # first call returns lwork as work[1], rwork length as rwork[1] and iwork length as iwork[1] ccall((@blasfunc($gelsd), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, - Ref{$relty}, Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, + Ref{$relty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ref{BlasInt}, Ref{BlasInt}), - &m, &n, &size(B,2), A, - &max(1,stride(A,2)), newB, &max(1,stride(B,2),n), s, - $relty(rcond), rnk, work, &lwork, + m, n, size(B,2), A, + max(1,stride(A,2)), newB, max(1,stride(B,2),n), s, + $relty(rcond), rnk, work, lwork, rwork, iwork, info) chklapackerror(info[]) if i == 1 @@ -1353,13 +1353,13 @@ for (gelsd, gelsy, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gelsy), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ref{$relty}, Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ref{$relty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - &m, &n, &nrhs, A, - &lda, newB, &ldb, jpvt, - $relty(rcond), rnk, work, &lwork, + m, n, nrhs, A, + lda, newB, ldb, jpvt, + $relty(rcond), rnk, work, lwork, rwork, info) chklapackerror(info[]) if i == 1 @@ -1427,12 +1427,12 @@ for (gglse, elty) in ((:dgglse_, :Float64), lwork = BlasInt(-1) for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gglse), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &m, &n, &p, A, &max(1,stride(A,2)), B, &max(1,stride(B,2)), c, d, X, - work, &lwork, info) + m, n, p, A, max(1,stride(A,2)), B, max(1,stride(B,2)), c, d, X, + work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -1490,20 +1490,20 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in for i = 1:2 # first call returns lwork as work[1] if cmplx ccall((@blasfunc($geev), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &jobvl, &jobvr, &n, A, &max(1,stride(A,2)), W, VL, &n, VR, &n, - work, &lwork, rwork, info) + jobvl, jobvr, n, A, max(1,stride(A,2)), W, VL, n, VR, n, + work, lwork, rwork, info) else ccall((@blasfunc($geev), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}), - &jobvl, &jobvr, &n, A, &max(1,stride(A,2)), WR, WI, VL, &n, - VR, &n, work, &lwork, info) + (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}), + jobvl, jobvr, n, A, max(1,stride(A,2)), WR, WI, VL, n, + VR, n, work, lwork, info) end chklapackerror(info[]) if i == 1 @@ -1554,20 +1554,20 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in for i = 1:2 # first call returns lwork as work[1] if cmplx ccall((@blasfunc($gesdd), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &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) + 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) else ccall((@blasfunc($gesdd), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &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) + 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) end chklapackerror(info[]) if i == 1 @@ -1622,20 +1622,20 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in for i in 1:2 # first call returns lwork as work[1] if cmplx ccall((@blasfunc($gesvd), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - &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) + (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}), + 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) else ccall((@blasfunc($gesvd), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}), - &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) + (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}), + 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) end chklapackerror(info[]) if i == 1 @@ -1701,31 +1701,31 @@ for (geev, gesvd, gesdd, ggsvd, elty, relty) in info = Ref{BlasInt}() if cmplx ccall((@blasfunc($ggsvd), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + 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}), - &jobu, &jobv, &jobq, &m, - &n, &p, k, l, - A, &lda, B, &ldb, - alpha, beta, U, &ldu, - V, &ldv, Q, &ldq, + jobu, jobv, jobq, m, + n, p, k, l, + A, lda, B, ldb, + alpha, beta, U, ldu, + V, ldv, Q, ldq, work, rwork, iwork, info) else ccall((@blasfunc($ggsvd), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + 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}), - &jobu, &jobv, &jobq, &m, - &n, &p, k, l, - A, &lda, B, &ldb, - alpha, beta, U, &ldu, - V, &ldv, Q, &ldq, + jobu, jobv, jobq, m, + n, p, k, l, + A, lda, B, ldb, + alpha, beta, U, ldu, + V, ldv, Q, ldq, work, iwork, info) end chklapackerror(info[]) @@ -1820,18 +1820,18 @@ for (f, elty) in ((:dggsvd3_, :Float64), info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($f), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}), - &jobu, &jobv, &jobq, &m, - &n, &p, k, l, - A, &lda, B, &ldb, - alpha, beta, U, &ldu, - V, &ldv, Q, &ldq, - work, &lwork, iwork, info) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, + 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}), + jobu, jobv, jobq, m, + n, p, k, l, + A, lda, B, ldb, + alpha, beta, U, ldu, + V, ldv, Q, ldq, + work, lwork, iwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -1877,19 +1877,19 @@ for (f, elty, relty) in ((:zggsvd3_, :Complex128, :Float64), info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($f), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + 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}, Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, Ptr{BlasInt}), - &jobu, &jobv, &jobq, &m, - &n, &p, k, l, - A, &lda, B, &ldb, - alpha, beta, U, &ldu, - V, &ldv, Q, &ldq, - work, &lwork, rwork, iwork, + 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) chklapackerror(info[]) if i == 1 @@ -1985,18 +1985,18 @@ for (geevx, ggev, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($geevx), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &balanc, &jobvl, &jobvr, &sense, - &n, A, &lda, wr, - wi, VL, &max(1,ldvl), VR, - &max(1,ldvr), ilo, ihi, scale, + Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), + 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) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -2050,15 +2050,15 @@ for (geevx, ggev, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ggev), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, + 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}), - &jobvl, &jobvr, &n, A, - &lda, B, &ldb, alphar, - alphai, beta, vl, &ldvl, - vr, &ldvr, work, &lwork, + jobvl, jobvr, n, A, + lda, B, ldb, alphar, + alphai, beta, vl, ldvl, + vr, ldvr, work, lwork, info) chklapackerror(info[]) if i == 1 @@ -2130,17 +2130,17 @@ for (geevx, ggev, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($geevx), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$relty}, - Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, + Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - &balanc, &jobvl, &jobvr, &sense, - &n, A, &lda, w, - VL, &max(1,ldvl), VR, &max(1,ldvr), + balanc, jobvl, jobvr, sense, + n, A, lda, w, + VL, max(1,ldvl), VR, max(1,ldvr), ilo, ihi, scale, abnrm, - rconde, rcondv, work, &lwork, + rconde, rcondv, work, lwork, rwork, info) chklapackerror(info[]) if i == 1 @@ -2196,15 +2196,15 @@ for (geevx, ggev, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ggev), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, 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{$relty}, Ptr{BlasInt}), - &jobvl, &jobvr, &n, A, - &lda, B, &ldb, alpha, - beta, vl, &ldvl, vr, - &ldvr, work, &lwork, rwork, + jobvl, jobvr, n, A, + lda, B, ldb, alpha, + beta, vl, ldvl, vr, + ldvr, work, lwork, rwork, info) chklapackerror(info[]) if i == 1 @@ -2269,11 +2269,11 @@ for (laic1, elty) in s = Vector{$elty}(1) c = Vector{$elty}(1) ccall((@blasfunc($laic1), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{$elty}, + Ptr{$elty}, Ref{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}), - &job, &j, x, &sest, - w, &gamma, sestpr, s, + job, j, x, sest, + w, gamma, sestpr, s, c) sestpr[1], s[1], c[1] end @@ -2302,11 +2302,11 @@ for (laic1, elty, relty) in s = Vector{$elty}(1) c = Vector{$elty}(1) ccall((@blasfunc($laic1), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$relty}, - Ptr{$elty}, Ptr{$elty}, Ptr{$relty}, Ptr{$elty}, + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{$relty}, + Ptr{$elty}, Ref{$elty}, Ptr{$relty}, Ptr{$elty}, Ptr{$elty}), - &job, &j, x, &sest, - w, &gamma, sestpr, s, + job, j, x, sest, + w, gamma, sestpr, s, c) sestpr[1], s[1], c[1] end @@ -2343,9 +2343,9 @@ for (gtsv, gttrf, gttrs, elty) in end info = Ref{BlasInt}() ccall((@blasfunc($gtsv), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &n, &size(B,2), dl, d, du, B, &max(1,stride(B,2)), info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + n, size(B,2), dl, d, du, B, max(1,stride(B,2)), info) chklapackerror(info[]) B end @@ -2369,9 +2369,9 @@ for (gtsv, gttrf, gttrs, elty) in ipiv = similar(d, BlasInt, n) info = Ref{BlasInt}() ccall((@blasfunc($gttrf), liblapack), Void, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, + (Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &n, dl, d, du, du2, ipiv, info) + n, dl, d, du, du2, ipiv, info) chklapackerror(info[]) dl, d, du, du2, ipiv end @@ -2400,10 +2400,10 @@ for (gtsv, gttrf, gttrs, elty) in end info = Ref{BlasInt}() ccall((@blasfunc($gttrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{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}), + trans, n, size(B,2), dl, d, du, du2, ipiv, B, max(1,stride(B,2)), info) chklapackerror(info[]) B end @@ -2466,9 +2466,9 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($orglq), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, &k, A, &max(1,stride(A,2)), tau, work, &lwork, info) + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, k, A, max(1,stride(A,2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -2499,10 +2499,10 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($orgqr), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, &k, A, - &max(1,stride(A,2)), tau, work, &lwork, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, k, A, + max(1,stride(A,2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 @@ -2534,10 +2534,10 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($orgql), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, &k, A, - &max(1,stride(A,2)), tau, work, &lwork, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, k, A, + max(1,stride(A,2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 @@ -2569,10 +2569,10 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($orgrq), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &m, &n, &k, A, - &max(1,stride(A,2)), tau, work, &lwork, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + m, n, k, A, + max(1,stride(A,2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 @@ -2619,11 +2619,11 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ormlq), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &side, &trans, &m, &n, &k, A, &max(1,stride(A,2)), tau, - C, &max(1,stride(C,2)), work, &lwork, info) + (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}), + side, trans, m, n, k, A, max(1,stride(A,2)), tau, + C, max(1,stride(C,2)), work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -2665,13 +2665,13 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ormqr), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &side, &trans, &m, &n, - &k, A, &max(1,stride(A,2)), tau, - C, &max(1, stride(C,2)), work, &lwork, + side, trans, m, n, + k, A, max(1,stride(A,2)), tau, + C, max(1, stride(C,2)), work, lwork, info) chklapackerror(info[]) if i == 1 @@ -2714,13 +2714,13 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ormql), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &side, &trans, &m, &n, - &k, A, &max(1,stride(A,2)), tau, - C, &max(1, stride(C,2)), work, &lwork, + side, trans, m, n, + k, A, max(1,stride(A,2)), tau, + C, max(1, stride(C,2)), work, lwork, info) chklapackerror(info[]) if i == 1 @@ -2763,11 +2763,11 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ormrq), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &side, &trans, &m, &n, &k, A, &max(1,stride(A,2)), tau, - C, &max(1,stride(C,2)), work, &lwork, info) + (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}), + side, trans, m, n, k, A, max(1,stride(A,2)), tau, + C, max(1,stride(C,2)), work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -2818,13 +2818,13 @@ for (orglq, orgqr, orgql, orgrq, ormlq, ormqr, ormql, ormrq, gemqrt, elty) in work = Vector{$elty}(wss) info = Ref{BlasInt}() ccall((@blasfunc($gemqrt), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &side, &trans, &m, &n, - &k, &nb, V, &ldv, - T, &max(1,stride(T,2)), C, &max(1,ldc), + side, trans, m, n, + k, nb, V, ldv, + T, max(1,stride(T,2)), C, max(1,ldc), work, info) chklapackerror(info[]) return C @@ -2936,9 +2936,9 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in end info = Ref{BlasInt}() ccall((@blasfunc($posv), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), B, &max(1,stride(B,2)), info) + (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) chkargsok(info[]) chkposdef(info[]) A, B @@ -2960,8 +2960,8 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in end info = Ref{BlasInt}() ccall((@blasfunc($potrf), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &size(A,1), A, &lda, info) + (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + uplo, size(A,1), A, lda, info) chkargsok(info[]) #info[] > 0 means the leading minor of order info[] is not positive definite #ordinarily, throw Exception here, but return error code here @@ -2980,8 +2980,8 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in chkuplo(uplo) info = Ref{BlasInt}() ccall((@blasfunc($potri), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &size(A,1), A, &max(1,stride(A,2)), info) + (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + uplo, size(A,1), A, max(1,stride(A,2)), info) chkargsok(info[]) chknonsingular(info[]) A @@ -3008,10 +3008,10 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in ldb = max(1,stride(B,2)) info = Ref{BlasInt}() ccall((@blasfunc($potrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &nrhs, A, - &lda, B, &ldb, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + uplo, n, nrhs, A, + lda, B, ldb, info) chklapackerror(info[]) return B end @@ -3033,9 +3033,9 @@ for (posv, potrf, potri, potrs, pstrf, elty, rtyp) in work = Vector{$rtyp}(2n) info = Ref{BlasInt}() ccall((@blasfunc($pstrf), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$rtyp}, Ptr{$rtyp}, Ptr{BlasInt}), - &uplo, &n, A, &max(1,stride(A,2)), piv, rank, &tol, work, info) + (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) chkargsok(info[]) A, piv, rank[1], info[] #Stored in PivotedCholesky end @@ -3121,9 +3121,9 @@ for (ptsv, pttrf, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($ptsv), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &n, &size(B,2), D, E, B, &max(1,stride(B,2)), info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$relty}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + n, size(B,2), D, E, B, max(1,stride(B,2)), info) chklapackerror(info[]) B end @@ -3141,8 +3141,8 @@ for (ptsv, pttrf, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($pttrf), liblapack), Void, - (Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}), - &n, D, E, info) + (Ref{BlasInt}, Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}), + n, D, E, info) chklapackerror(info[]) D, E end @@ -3187,9 +3187,9 @@ for (pttrs, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($pttrs), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &n, &size(B,2), D, E, B, &max(1,stride(B,2)), info) + (Ref{BlasInt}, Ref{BlasInt}, Ptr{$relty}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + n, size(B,2), D, E, B, max(1,stride(B,2)), info) chklapackerror(info[]) B end @@ -3220,9 +3220,9 @@ for (pttrs, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($pttrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$relty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), D, E, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -3259,9 +3259,9 @@ for (trtri, trtrs, elty) in lda = max(1,stride(A, 2)) info = Ref{BlasInt}() ccall((@blasfunc($trtri), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &uplo, &diag, &n, A, &lda, info) + uplo, diag, n, A, lda, info) chklapackerror(info[]) A end @@ -3284,10 +3284,10 @@ for (trtri, trtrs, elty) in end info = Ref{BlasInt}() ccall((@blasfunc($trtrs), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &trans, &diag, &n, &size(B,2), A, &max(1,stride(A,2)), - B, &max(1,stride(B,2)), info) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), + uplo, trans, diag, n, size(B,2), A, max(1,stride(A,2)), + B, max(1,stride(B,2)), info) chklapackerror(info[]) B end @@ -3339,10 +3339,10 @@ for (trcon, trevc, trrfs, elty) in iwork = Vector{BlasInt}(n) info = Ref{BlasInt}() ccall((@blasfunc($trcon), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ref{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &norm, &uplo, &diag, &n, - A, &max(1,stride(A,2)), rcond, work, iwork, info) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), + norm, uplo, diag, n, + A, max(1,stride(A,2)), rcond, work, iwork, info) chklapackerror(info[]) rcond[] end @@ -3377,13 +3377,13 @@ for (trcon, trevc, trrfs, elty) in info = Ref{BlasInt}() ccall((@blasfunc($trevc), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt},Ptr{BlasInt}, Ptr{BlasInt}, + (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}), - &side, &howmny, select, &n, - T, &ldt, VL, &ldvl, - VR, &ldvr, &mm, m, + side, howmny, select, n, + T, ldt, VL, ldvl, + VR, ldvr, mm, m, work, info) chklapackerror(info[]) @@ -3432,11 +3432,11 @@ for (trcon, trevc, trrfs, elty) in iwork = Vector{BlasInt}(n) info = Ref{BlasInt}() ccall((@blasfunc($trrfs), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &uplo, &trans, &diag, &n, - &nrhs, A, &max(1,stride(A,2)), B, &max(1,stride(B,2)), X, &max(1,stride(X,2)), + 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) chklapackerror(info[]) Ferr, Berr @@ -3467,10 +3467,10 @@ for (trcon, trevc, trrfs, elty, relty) in rwork = Vector{$relty}(n) info = Ref{BlasInt}() ccall((@blasfunc($trcon), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ref{$relty}, Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}), - &norm, &uplo, &diag, &n, - A, &max(1,stride(A,2)), rcond, work, rwork, info) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ref{$relty}, Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}), + norm, uplo, diag, n, + A, max(1,stride(A,2)), rcond, work, rwork, info) chklapackerror(info[]) rcond[] end @@ -3506,13 +3506,13 @@ for (trcon, trevc, trrfs, elty, relty) in rwork = Vector{$relty}(n) info = Ref{BlasInt}() ccall((@blasfunc($trevc), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + (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}), - &side, &howmny, select, &n, - T, &ldt, VL, &ldvl, - VR, &ldvr, &mm, m, + side, howmny, select, n, + T, ldt, VL, ldvl, + VR, ldvr, mm, m, work, rwork, info) chklapackerror(info[]) @@ -3561,11 +3561,11 @@ for (trcon, trevc, trrfs, elty, relty) in rwork = Vector{$relty}(n) info = Ref{BlasInt}() ccall((@blasfunc($trrfs), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &uplo, &trans, &diag, &n, - &nrhs, A, &max(1,stride(A,2)), B, &max(1,stride(B,2)), X, &max(1,stride(X,2)), + 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) chklapackerror(info[]) Ferr, Berr @@ -3631,9 +3631,9 @@ for (stev, stebz, stegr, stein, elty) in work = Vector{$elty}(max(1, 2n-2)) info = Ref{BlasInt}() ccall((@blasfunc($stev), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &job, &n, dv, ev, Zmat, &n, work, info) + (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), + job, n, dv, ev, Zmat, n, work, info) chklapackerror(info[]) dv, Zmat end @@ -3658,13 +3658,13 @@ for (stev, stebz, stegr, stein, elty) in iwork = Vector{BlasInt}(3*n) info = Ref{BlasInt}() ccall((@blasfunc($stebz), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ref{$elty}, + 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}), - &range, &order, &n, &vl, - &vu, &il, &iu, &abstol, + range, order, n, vl, + vu, il, iu, abstol, dv, ev, m, nsplit, w, iblock, isplit, work, iwork, info) @@ -3692,16 +3692,16 @@ for (stev, stebz, stegr, stein, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] and liwork as iwork[1] ccall((@blasfunc($stegr), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &jobz, &range, &n, dv, - eev, &vl, &vu, &il, - &iu, abstol, m, w, - Z, &ldz, isuppz, work, - &lwork, iwork, &liwork, info) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, + 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}), + jobz, range, n, dv, + eev, vl, vu, il, + iu, abstol, m, w, + Z, ldz, isuppz, work, + lwork, iwork, liwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -3749,11 +3749,11 @@ for (stev, stebz, stegr, stein, elty) in ifail = Vector{BlasInt}(m) info = Ref{BlasInt}() ccall((@blasfunc($stein), liblapack), Void, - (Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, + Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &n, dv, ev, &m, w, iblock, isplit, z, &ldz, work, iwork, ifail, info) + n, dv, ev, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info) chklapackerror(info[]) if any(ifail .!= 0) # TODO: better error message / type @@ -3837,9 +3837,9 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($syconv), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, 'C', n, A, max(1,stride(A,2)), ipiv, work, info) chklapackerror(info[]) A, work end @@ -3865,10 +3865,10 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), - work, &lwork, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{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)), + work, lwork, info) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -3899,9 +3899,9 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, A, &stride(A,2), ipiv, work, &lwork, info) + (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) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -3954,9 +3954,9 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, n, A, max(1,stride(A,2)), ipiv, work, info) chkargsok(info[]) chknonsingular(info[]) A @@ -3980,9 +3980,9 @@ for (syconv, sysv, sytrf, sytri, sytrs, elty) in end info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -4015,10 +4015,10 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), - work, &lwork, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{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)), + work, lwork, info) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -4049,9 +4049,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, A, &stride(A,2), ipiv, work, &lwork, info) + (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) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4075,9 +4075,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, n, A, max(1,stride(A,2)), ipiv, work, info) chkargsok(info[]) chknonsingular(info[]) A @@ -4101,9 +4101,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in end info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -4138,10 +4138,10 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty) in info = Ref{BlasInt}() ccall((@blasfunc($syconvf), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &way, &n, A, - &lda, ipiv, e, info) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), + uplo, way, n, A, + lda, ipiv, e, info) chklapackerror(info[]) return A, e @@ -4171,9 +4171,9 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($syconv), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, 'C', n, A, max(1,stride(A,2)), ipiv, work, info) chklapackerror(info[]) A, work end @@ -4199,10 +4199,10 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hesv), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), - work, &lwork, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{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)), + work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4230,9 +4230,9 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() for i in 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hetrf), liblapack), Void, - (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) + (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) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4287,9 +4287,9 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($hetri), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, n, A, max(1,stride(A,2)), ipiv, work, info) chklapackerror(info[]) A end @@ -4311,9 +4311,9 @@ for (syconv, hesv, hetrf, hetri, hetrs, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($hetrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -4345,10 +4345,10 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hesv), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), - work, &lwork, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{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)), + work, lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4376,9 +4376,9 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in info = Ref{BlasInt}() for i in 1:2 # first call returns lwork as work[1] ccall((@blasfunc($hetrf), liblapack), Void, - (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) + (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) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4403,9 +4403,9 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($hetri), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, n, A, max(1,stride(A,2)), ipiv, work, info) chklapackerror(info[]) A end @@ -4427,9 +4427,9 @@ for (hesv, hetrf, hetri, hetrs, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($hetrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -4462,10 +4462,10 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), - work, &lwork, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{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)), + work, lwork, info) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -4497,9 +4497,9 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Void, - (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) + (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) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4553,9 +4553,9 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, n, A, max(1,stride(A,2)), ipiv, work, info) chklapackerror(info[]) A end @@ -4578,9 +4578,9 @@ for (sysv, sytrf, sytri, sytrs, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -4613,10 +4613,10 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sysv), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), - work, &lwork, info) + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, + Ptr{$elty}, Ref{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)), + work, lwork, info) chkargsok(info[]) chknonsingular(info[]) if i == 1 @@ -4648,9 +4648,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($sytrf), liblapack), Void, - (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) + (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) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4675,9 +4675,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($sytri), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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) + uplo, n, A, max(1,stride(A,2)), ipiv, work, info) chklapackerror(info[]) A end @@ -4700,9 +4700,9 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in end info = Ref{BlasInt}() ccall((@blasfunc($sytrs), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &uplo, &n, &size(B,2), A, &max(1,stride(A,2)), ipiv, B, &max(1,stride(B,2)), info) + (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) chklapackerror(info[]) B end @@ -4738,10 +4738,10 @@ for (sysv, sytrf, sytri, sytrs, syconvf, elty, relty) in info = Ref{BlasInt}() ccall((@blasfunc($syconvf), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &uplo, &way, &n, A, - &max(1, lda), ipiv, e, info) + (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), + uplo, way, n, A, + max(1, lda), ipiv, e, info) chklapackerror(info[]) return A, e @@ -4869,9 +4869,9 @@ for (syev, syevr, sygvd, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($syev), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &jobz, &uplo, &n, A, &max(1,stride(A,2)), W, work, &lwork, info) + (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) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -4919,17 +4919,17 @@ for (syev, syevr, sygvd, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] and liwork as iwork[1] ccall((@blasfunc($syevr), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ref{$elty}, + 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}), - &jobz, &range, &uplo, &n, - A, &max(1,lda), &vl, &vu, - &il, &iu, &abstol, m, - w, Z, &max(1,ldz), isuppz, - work, &lwork, iwork, &liwork, + 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) chklapackerror(info[]) if i == 1 @@ -4970,14 +4970,14 @@ for (syev, syevr, sygvd, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] and liwork as iwork[1] ccall((@blasfunc($sygvd), liblapack), Void, - (Ptr{BlasInt}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}), - &itype, &jobz, &uplo, &n, - A, &lda, B, &ldb, - w, work, &lwork, iwork, - &liwork, info) + (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}), + itype, jobz, uplo, n, + A, lda, B, ldb, + w, work, lwork, iwork, + liwork, info) chkargsok(info[]) if i == 1 lwork = BlasInt(work[1]) @@ -5014,9 +5014,9 @@ for (syev, syevr, sygvd, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($syev), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - &jobz, &uplo, &n, A, &stride(A,2), W, work, &lwork, rwork, info) + (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) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5069,18 +5069,18 @@ for (syev, syevr, sygvd, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1], lrwork as rwork[1] and liwork as iwork[1] ccall((@blasfunc($syevr), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &jobz, &range, &uplo, &n, - A, &lda, &vl, &vu, - &il, &iu, &abstol, m, - w, Z, &ldz, isuppz, - work, &lwork, rwork, &lrwork, - iwork, &liwork, info) + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ref{$elty}, Ref{$elty}, + 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}), + jobz, range, uplo, n, + A, lda, vl, vu, + il, iu, abstol, m, + w, Z, ldz, isuppz, + work, lwork, rwork, lrwork, + iwork, liwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5124,14 +5124,14 @@ for (syev, syevr, sygvd, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1], lrwork as rwork[1] and liwork as iwork[1] ccall((@blasfunc($sygvd), liblapack), Void, - (Ptr{BlasInt}, Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$relty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}), - &itype, &jobz, &uplo, &n, - A, &lda, B, &ldb, - w, work, &lwork, rwork, - &lrwork, iwork, &liwork, info) + (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}), + itype, jobz, uplo, n, + A, lda, B, ldb, + w, work, lwork, rwork, + lrwork, iwork, liwork, info) chkargsok(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5222,14 +5222,14 @@ for (bdsqr, relty, elty) in work = Vector{$relty}(4n) info = Ref{BlasInt}() ccall((@blasfunc($bdsqr), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$relty}, Ptr{$relty}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$relty}, Ptr{BlasInt}), - &uplo, &n, &ncvt, &nru, - &ncc, d, e_, Vt, - &ldvt, U, &ldu, C, - &ldc, work, info) + (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}), + uplo, n, ncvt, nru, + ncc, d, e_, Vt, + ldvt, U, ldu, C, + ldc, work, info) chklapackerror(info[]) d, Vt, U, C #singular values in descending order, P**T * VT, U * Q, Q**T * C end @@ -5292,11 +5292,11 @@ for (bdsdc, elty) in iwork = Vector{BlasInt}(8n) info = Ref{BlasInt}() ccall((@blasfunc($bdsdc), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &uplo, &compq, &n, d, e_, - u, &ldu, vt, &ldvt, + uplo, compq, n, d, e_, + u, ldu, vt, ldvt, q, iq, work, iwork, info) chklapackerror(info[]) d, e, u, vt, q, iq @@ -5342,10 +5342,10 @@ for (gecon, elty) in iwork = Vector{BlasInt}(n) info = Ref{BlasInt}() ccall((@blasfunc($gecon), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ref{$elty}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{$elty}, Ref{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}), - &normtype, &n, A, &lda, &anorm, rcond, work, iwork, + normtype, n, A, lda, anorm, rcond, work, iwork, info) chklapackerror(info[]) rcond[] @@ -5376,10 +5376,10 @@ for (gecon, elty, relty) in rwork = Vector{$relty}(2n) info = Ref{BlasInt}() ccall((@blasfunc($gecon), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$relty}, Ref{$relty}, Ptr{$elty}, Ptr{$relty}, + (Ref{UInt8}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{$relty}, Ref{$relty}, Ptr{$elty}, Ptr{$relty}, Ptr{BlasInt}), - &normtype, &n, A, &lda, &anorm, rcond, work, rwork, + normtype, n, A, lda, anorm, rcond, work, rwork, info) chklapackerror(info[]) rcond[] @@ -5419,11 +5419,11 @@ for (gehrd, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gehrd), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &n, &ilo, &ihi, A, - &max(1, stride(A, 2)), tau, work, &lwork, + n, ilo, ihi, A, + max(1, stride(A, 2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 @@ -5469,11 +5469,11 @@ for (orghr, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($orghr), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &n, &ilo, &ihi, A, - &max(1, stride(A, 2)), tau, work, &lwork, + n, ilo, ihi, A, + max(1, stride(A, 2)), tau, work, lwork, info) chklapackerror(info[]) if i == 1 @@ -5525,14 +5525,14 @@ for (ormhr, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($ormhr), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}), - &side, &trans, &mC, &nC, - &ilo, &ihi, A, &max(1, stride(A, 2)), - tau, C, &max(1, stride(C, 2)), work, - &lwork, info) + (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}), + side, trans, mC, nC, + ilo, ihi, A, max(1, stride(A, 2)), + tau, C, max(1, stride(C, 2)), work, + lwork, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5569,14 +5569,14 @@ for (gees, gges, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gees), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{Void}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{Void}, Ptr{BlasInt}), - &jobvs, &'N', C_NULL, &n, - A, &max(1, stride(A, 2)), sdim, wr, - wi, vs, &ldvs, work, - &lwork, C_NULL, info) + (Ref{UInt8}, Ref{UInt8}, Ptr{Void}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{Void}, Ptr{BlasInt}), + jobvs, 'N', C_NULL, n, + A, max(1, stride(A, 2)), sdim, wr, + wi, vs, ldvs, work, + lwork, C_NULL, info) chklapackerror(info[]) if i == 1 lwork = BlasInt(real(work[1])) @@ -5614,17 +5614,17 @@ for (gees, gges, elty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gges), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{Void}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{Void}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ptr{Void}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{Void}, Ptr{BlasInt}), - &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, + 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) chklapackerror(info[]) if i == 1 @@ -5663,13 +5663,13 @@ for (gees, gges, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gees), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{Void}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ptr{Void}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{Void}, Ptr{BlasInt}), - &jobvs, &sort, C_NULL, &n, - A, &max(1, stride(A, 2)), &sdim, w, - vs, &ldvs, work, &lwork, + jobvs, sort, C_NULL, n, + A, max(1, stride(A, 2)), sdim, w, + vs, ldvs, work, lwork, rwork, C_NULL, info) chklapackerror(info[]) if i == 1 @@ -5709,17 +5709,17 @@ for (gees, gges, elty, relty) in info = Ref{BlasInt}() for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($gges), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{UInt8}, Ptr{Void}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$relty}, Ptr{Void}, + (Ref{UInt8}, Ref{UInt8}, Ref{UInt8}, Ptr{Void}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$relty}, Ptr{Void}, Ptr{BlasInt}), - &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, + 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) chklapackerror(info[]) if i == 1 @@ -5774,13 +5774,13 @@ for (trexc, trsen, tgsen, elty) in work = Vector{$elty}(n) info = Ref{BlasInt}() ccall((@blasfunc($trexc), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{BlasInt}, Ref{BlasInt}, Ptr{$elty}, Ptr{BlasInt}), - &compq, &n, - T, &ldt, Q, &ldq, - &ifst, &ilst, + compq, n, + T, ldt, Q, ldq, + ifst, ilst, work, info) chklapackerror(info[]) T, Q @@ -5814,15 +5814,15 @@ for (trexc, trsen, tgsen, elty) in select = convert(Array{BlasInt}, select) for i = 1:2 # first call returns lwork as work[1] and liwork as iwork[1] ccall((@blasfunc($trsen), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{$elty}, Ptr{BlasInt}, Ptr{Void}, Ptr{Void}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ptr{BlasInt}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ptr{$elty}, Ref{BlasInt}, Ptr{Void}, Ptr{Void}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}), - &compq, &job, select, &n, - T, &ldt, Q, &ldq, - wr, wi, &m, C_NULL, C_NULL, - work, &lwork, iwork, &liwork, + compq, job, select, n, + T, ldt, Q, ldq, + wr, wi, m, C_NULL, C_NULL, + work, lwork, iwork, liwork, info) chklapackerror(info[]) if i == 1 # only estimated optimal lwork, liwork @@ -5879,19 +5879,19 @@ for (trexc, trsen, tgsen, elty) in select = convert(Array{BlasInt}, select) for i = 1:2 # first call returns lwork as work[1] and liwork as iwork[1] ccall((@blasfunc($tgsen), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{Void}, Ptr{Void}, Ptr{Void}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{BlasInt}, Ptr{Void}, Ptr{Void}, Ptr{Void}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}), - &0, &1, &1, select, - &n, S, &lds, T, - &ldt, alphar, alphai, beta, - Q, &ldq, Z, &ldz, - &m, C_NULL, C_NULL, C_NULL, - work, &lwork, iwork, &liwork, + 0, 1, 1, select, + n, S, lds, T, + ldt, alphar, alphai, beta, + Q, ldq, Z, ldz, + m, C_NULL, C_NULL, C_NULL, + work, lwork, iwork, liwork, info) chklapackerror(info[]) if i == 1 # only estimated optimal lwork, liwork @@ -5923,13 +5923,13 @@ for (trexc, trsen, tgsen, elty) in ldq = max(1, stride(Q, 2)) info = Ref{BlasInt}() ccall((@blasfunc($trexc), liblapack), Void, - (Ptr{UInt8}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}), - &compq, &n, - T, &ldt, Q, &ldq, - &ifst, &ilst, + compq, n, + T, ldt, Q, ldq, + ifst, ilst, info) chklapackerror(info[]) T, Q @@ -5959,15 +5959,15 @@ for (trexc, trsen, tgsen, elty) in select = convert(Array{BlasInt}, select) for i = 1:2 # first call returns lwork as work[1] ccall((@blasfunc($trsen), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{Void}, Ptr{Void}, - Ptr{$elty}, Ptr{BlasInt}, + (Ref{UInt8}, Ref{UInt8}, Ptr{BlasInt}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ptr{$elty}, Ref{BlasInt}, Ptr{Void}, Ptr{Void}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}), - &compq, &job, select, &n, - T, &ldt, Q, &ldq, - w, &m, C_NULL, C_NULL, - work, &lwork, + compq, job, select, n, + T, ldt, Q, ldq, + w, m, C_NULL, C_NULL, + work, lwork, info) chklapackerror(info[]) if i == 1 # only estimated optimal lwork, liwork @@ -6021,19 +6021,19 @@ for (trexc, trsen, tgsen, elty) in select = convert(Array{BlasInt}, select) for i = 1:2 # first call returns lwork as work[1] and liwork as iwork[1] ccall((@blasfunc($tgsen), liblapack), Void, - (Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, - Ptr{BlasInt}, Ptr{$elty}, Ptr{$elty}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, - Ptr{BlasInt}, Ptr{Void}, Ptr{Void}, Ptr{Void}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, + (Ref{BlasInt}, Ref{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}, + Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, + Ref{BlasInt}, Ptr{$elty}, Ptr{$elty}, + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, + Ref{BlasInt}, Ptr{Void}, Ptr{Void}, Ptr{Void}, + Ptr{$elty}, Ref{BlasInt}, Ptr{BlasInt}, Ref{BlasInt}, Ptr{BlasInt}), - &0, &1, &1, select, - &n, S, &lds, T, - &ldt, alpha, beta, - Q, &ldq, Z, &ldz, - &m, C_NULL, C_NULL, C_NULL, - work, &lwork, iwork, &liwork, + 0, 1, 1, select, + n, S, lds, T, + ldt, alpha, beta, + Q, ldq, Z, ldz, + m, C_NULL, C_NULL, C_NULL, + work, lwork, iwork, liwork, info) chklapackerror(info[]) if i == 1 # only estimated optimal lwork, liwork @@ -6100,11 +6100,11 @@ for (fn, elty, relty) in ((:dtrsyl_, :Float64, :Float64), scale = Vector{$relty}(1) info = Ref{BlasInt}() ccall((@blasfunc($fn), liblapack), Void, - (Ptr{UInt8}, Ptr{UInt8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}, - Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, Ptr{$elty}, Ptr{BlasInt}, + (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}), - &transa, &transb, &isgn, &m, &n, - A, &lda, B, &ldb, C, &ldc, + transa, transb, isgn, m, n, + A, lda, B, ldb, C, ldc, scale, info) chklapackerror(info[]) C, scale[1] diff --git a/base/random/generation.jl b/base/random/generation.jl index 5c65633216e9e..e6174046fe45b 100644 --- a/base/random/generation.jl +++ b/base/random/generation.jl @@ -73,8 +73,8 @@ function rand(rng::AbstractRNG, gen::BigFloatRandGenerator, ::CloseOpen{BigFloat z.exp = 0 randbool && ccall((:mpfr_sub_d, :libmpfr), Int32, - (Ptr{BigFloat}, Ptr{BigFloat}, Cdouble, Int32), - &z, &z, 0.5, Base.MPFR.ROUNDING_MODE[]) + (Ref{BigFloat}, Ref{BigFloat}, Cdouble, Int32), + z, z, 0.5, Base.MPFR.ROUNDING_MODE[]) z end @@ -82,8 +82,8 @@ end # TODO: make an API for requesting full or not-full precision function rand(rng::AbstractRNG, gen::BigFloatRandGenerator, ::CloseOpen{BigFloat}, ::Void) z = rand(rng, Close1Open2(BigFloat), gen) - ccall((:mpfr_sub_ui, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Culong, Int32), - &z, &z, 1, Base.MPFR.ROUNDING_MODE[]) + ccall((:mpfr_sub_ui, :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Culong, Int32), + z, z, 1, Base.MPFR.ROUNDING_MODE[]) z end diff --git a/base/sparse/cholmod.jl b/base/sparse/cholmod.jl index b29f4ed701103..34d1eaad041a1 100644 --- a/base/sparse/cholmod.jl +++ b/base/sparse/cholmod.jl @@ -993,7 +993,7 @@ end convert(::Type{Sparse}, A::Dense) = dense_to_sparse(A, SuiteSparse_long) convert(::Type{Sparse}, L::Factor) = factor_to_sparse!(copy(L)) -function (::Type{Sparse})(filename::String) +function Sparse(filename::String) open(filename) do f return read_sparse(f, SuiteSparse_long) end diff --git a/base/sparse/umfpack.jl b/base/sparse/umfpack.jl index d123ffe04581b..61cc9bf79baa5 100644 --- a/base/sparse/umfpack.jl +++ b/base/sparse/umfpack.jl @@ -337,11 +337,11 @@ for itype in UmfpackIndexTypes (Ptr{$itype},Ptr{$itype},Ptr{Float64}, Ptr{$itype},Ptr{$itype},Ptr{Float64}, Ptr{$itype},Ptr{$itype},Ptr{Void}, - Ptr{$itype},Ptr{Float64},Ptr{Void}), + Ref{$itype},Ptr{Float64},Ptr{Void}), Lp,Lj,Lx, Up,Ui,Ux, P, Q, C_NULL, - &0, Rs, lu.numeric) + 0, Rs, lu.numeric) (transpose(SparseMatrixCSC(min(n_row, n_col), n_row, increment!(Lp), increment!(Lj), Lx)), SparseMatrixCSC(min(n_row, n_col), n_col, increment!(Up), increment!(Ui), Ux), increment!(P), increment!(Q), Rs) @@ -364,11 +364,11 @@ for itype in UmfpackIndexTypes (Ptr{$itype},Ptr{$itype},Ptr{Float64},Ptr{Float64}, Ptr{$itype},Ptr{$itype},Ptr{Float64},Ptr{Float64}, Ptr{$itype},Ptr{$itype},Ptr{Void}, Ptr{Void}, - Ptr{$itype},Ptr{Float64},Ptr{Void}), + Ref{$itype},Ptr{Float64},Ptr{Void}), Lp,Lj,Lx,Lz, Up,Ui,Ux,Uz, P, Q, C_NULL, C_NULL, - &0, Rs, lu.numeric) + 0, Rs, lu.numeric) (transpose(SparseMatrixCSC(min(n_row, n_col), n_row, increment!(Lp), increment!(Lj), complex.(Lx, Lz))), SparseMatrixCSC(min(n_row, n_col), n_col, increment!(Up), increment!(Ui), complex.(Ux, Uz)), increment!(P), increment!(Q), Rs) diff --git a/doc/src/manual/calling-c-and-fortran-code.md b/doc/src/manual/calling-c-and-fortran-code.md index 7b7ec77e641f5..5aae9bc30e090 100644 --- a/doc/src/manual/calling-c-and-fortran-code.md +++ b/doc/src/manual/calling-c-and-fortran-code.md @@ -687,8 +687,8 @@ function compute_dot(DX::Vector{Float64}, DY::Vector{Float64}) incx = incy = 1 product = ccall((:ddot_, "libLAPACK"), Float64, - (Ptr{Int32}, Ptr{Float64}, Ptr{Int32}, Ptr{Float64}, Ptr{Int32}), - &n, DX, &incx, DY, &incy) + (Ref{Int32}, Ptr{Float64}, Ref{Int32}, Ptr{Float64}, Ref{Int32}), + n, DX, incx, DY, incy) return product end ``` diff --git a/doc/src/manual/methods.md b/doc/src/manual/methods.md index 489aa1b45ed8d..862297a52d20b 100644 --- a/doc/src/manual/methods.md +++ b/doc/src/manual/methods.md @@ -529,7 +529,7 @@ Here is the correct code template for returning the element-type `T` of any arbitrary subtype of `AbstractArray`: ```julia -abstract AbstractArray{T, N} +abstract type AbstractArray{T, N} end eltype(::Type{<:AbstractArray{T}}) where {T} = T ``` using so-called triangular dispatch. Note that if `T` is a `UnionAll` @@ -540,11 +540,11 @@ Another way, which used to be the only correct way before the advent of triangular dispatch in Julia v0.6, is: ```julia -abstract AbstractArray{T, N} +abstract type AbstractArray{T, N} end eltype(::Type{AbstractArray}) = Any -eltype{T}(::Type{AbstractArray{T}}) = T -eltype{T, N}(::Type{AbstractArray{T, N}}) = T -eltype{A<:AbstractArray}(::Type{A}) = eltype(supertype(A)) +eltype(::Type{AbstractArray{T}}) where {T} = T +eltype(::Type{AbstractArray{T, N}}) where {T, N} = T +eltype(::Type{A}) where {A<:AbstractArray} = eltype(supertype(A)) ``` Another possibility is the following, which could useful to adapt diff --git a/test/TestHelpers.jl b/test/TestHelpers.jl index 0ee2501159c98..b6513abfec3cb 100644 --- a/test/TestHelpers.jl +++ b/test/TestHelpers.jl @@ -129,8 +129,8 @@ OffsetVector{T,AA<:AbstractArray} = OffsetArray{T,1,AA} OffsetArray(A::AbstractArray{T,N}, offsets::NTuple{N,Int}) where {T,N} = OffsetArray{T,N,typeof(A)}(A, offsets) OffsetArray(A::AbstractArray{T,N}, offsets::Vararg{Int,N}) where {T,N} = OffsetArray(A, offsets) -(::Type{OffsetArray{T,N}})(inds::Indices{N}) where {T,N} = OffsetArray{T,N,Array{T,N}}(Array{T,N}(map(length, inds)), map(indsoffset, inds)) -(::Type{OffsetArray{T}})(inds::Indices{N}) where {T,N} = OffsetArray{T,N}(inds) +OffsetArray{T,N}(inds::Indices{N}) where {T,N} = OffsetArray{T,N,Array{T,N}}(Array{T,N}(map(length, inds)), map(indsoffset, inds)) +OffsetArray{T}(inds::Indices{N}) where {T,N} = OffsetArray{T,N}(inds) Base.IndexStyle(::Type{T}) where {T<:OffsetArray} = Base.IndexStyle(parenttype(T)) parenttype(::Type{OffsetArray{T,N,AA}}) where {T,N,AA} = AA diff --git a/test/ccall.jl b/test/ccall.jl index 9ce6c764de033..1e131f4da296a 100644 --- a/test/ccall.jl +++ b/test/ccall.jl @@ -82,7 +82,7 @@ let a, ci_ary, x @test x == a + 1 - 2im @test a == 20 + 51im - x = ccall((:cptest_static, libccalltest), Ptr{Complex{Int}}, (Ptr{Complex{Int}},), &a) + x = ccall((:cptest_static, libccalltest), Ptr{Complex{Int}}, (Ref{Complex{Int}},), a) @test unsafe_load(x) == a Libc.free(convert(Ptr{Void}, x)) end diff --git a/test/dimensionful.jl b/test/dimensionful.jl index 999f362cc27a7..bb3b5ac2043af 100644 --- a/test/dimensionful.jl +++ b/test/dimensionful.jl @@ -12,7 +12,7 @@ struct Furlong{p,T<:Number} <: Number end Furlong(x::T) where {T<:Number} = Furlong{1,T}(x) (::Type{T})(x::Furlong{p,T}) where {p,T} = x.val -(::Type{Furlong{p}})(v::Number) where {p} = Furlong{p,typeof(v)}(v) +Furlong{p}(v::Number) where {p} = Furlong{p,typeof(v)}(v) Base.convert(::Type{Furlong{p,T}}, x::Furlong{p,S}) where {T,p,S} = Furlong{p,T}(convert(T,x.val)) Base.convert(::Type{Furlong{0,T}}, x::Furlong{0}) where {T} = Furlong{0,T}(convert(T, x.val)) Base.convert(::Type{T}, x::Furlong{0}) where {T<:Number} = convert(T, x.val) diff --git a/test/inference.jl b/test/inference.jl index 6efe8b19b2f21..4bcb3b9c01ff7 100644 --- a/test/inference.jl +++ b/test/inference.jl @@ -817,7 +817,7 @@ end struct NArray_17003{T,N} <: AArray_17003{Nable_17003{T},N} end -(::Type{NArray_17003})(::Array{T,N}) where {T,N} = NArray_17003{T,N}() +NArray_17003(::Array{T,N}) where {T,N} = NArray_17003{T,N}() gl_17003 = [1, 2, 3] diff --git a/test/perf/array/indexing.jl b/test/perf/array/indexing.jl index 36527b0036a8d..eda9b1a71541a 100644 --- a/test/perf/array/indexing.jl +++ b/test/perf/array/indexing.jl @@ -112,7 +112,7 @@ end struct ArrayLSLS{T,N} <: MyArray{T,N} # IndexCartesian with IndexCartesian similar data::Array{T,N} end -Base.similar{T}(A::ArrayLSLS, ::Type{T}, dims::Tuple{Vararg{Int}}) = ArrayLSLS(similar(A.data, T, dims)) +Base.similar(A::ArrayLSLS, ::Type{T}, dims::Tuple{Vararg{Int}}) where {T} = ArrayLSLS(similar(A.data, T, dims)) @inline Base.setindex!(A::ArrayLSLS, v, I::Int...) = A.data[I...] = v @inline Base.unsafe_setindex!(A::ArrayLSLS, v, I::Int...) = Base.unsafe_setindex!(A.data, v, I...) Base.first(A::ArrayLSLS) = first(A.data) @@ -140,15 +140,15 @@ Base.size(A::MyArray) = size(A.data) @inline Base.unsafe_getindex(A::ArrayLF, indx::Int) = unsafe_getindex(A.data, indx) @inline Base.unsafe_getindex(A::Union{ArrayLS, ArrayLSLS}, i::Int, j::Int) = unsafe_getindex(A.data, i, j) -@inline Base.getindex{T}(A::ArrayStrides{T,2}, i::Real, j::Real) = getindex(A.data, 1+A.strides[1]*(i-1)+A.strides[2]*(j-1)) +@inline Base.getindex(A::ArrayStrides{T,2}, i::Real, j::Real) where {T} = getindex(A.data, 1+A.strides[1]*(i-1)+A.strides[2]*(j-1)) @inline Base.getindex(A::ArrayStrides1, i::Real, j::Real) = getindex(A.data, i + A.stride1*(j-1)) -@inline Base.unsafe_getindex{T}(A::ArrayStrides{T,2}, i::Real, j::Real) = unsafe_getindex(A.data, 1+A.strides[1]*(i-1)+A.strides[2]*(j-1)) +@inline Base.unsafe_getindex(A::ArrayStrides{T,2}, i::Real, j::Real) where {T} = unsafe_getindex(A.data, 1+A.strides[1]*(i-1)+A.strides[2]*(j-1)) @inline Base.unsafe_getindex(A::ArrayStrides1, i::Real, j::Real) = unsafe_getindex(A.data, i + A.stride1*(j-1)) # Using the qualified Base.IndexLinear() in the IndexStyle definition # requires looking up the symbol in the module on each call. import Base: IndexLinear -Base.IndexStyle{T<:ArrayLF}(::Type{T}) = IndexLinear() +Base.IndexStyle(::Type{T}) where {T<:ArrayLF} = IndexLinear() if !applicable(unsafe_getindex, [1 2], 1:1, 2) @inline Base.unsafe_getindex(A::Array, I...) = @inbounds return A[I...] @@ -157,7 +157,7 @@ if !applicable(unsafe_getindex, [1 2], 1:1, 2) @inline Base.unsafe_getindex(A::BitArray, I1::BitArray, I2::Int) = unsafe_getindex(A, Base.to_index(I1), I2) end -function makearrays{T}(::Type{T}, sz) +function makearrays(::Type{T}, sz) where T L = prod(sz) A = reshape(convert(Vector{T}, [1:L;]), sz) AS = ArrayLS(A) diff --git a/test/reflection.jl b/test/reflection.jl index 11c23ea08f96d..37a31875d4fbf 100644 --- a/test/reflection.jl +++ b/test/reflection.jl @@ -609,7 +609,7 @@ end mutable struct A18434 end -(::Type{A18434})(x; y=1) = 1 +A18434(x; y=1) = 1 global counter18434 = 0 function get_A18434() diff --git a/test/replutil.jl b/test/replutil.jl index f233b3854f582..37d169f1e1afb 100644 --- a/test/replutil.jl +++ b/test/replutil.jl @@ -356,7 +356,7 @@ Base.Symbol() = throw(ErrorException("1")) EightBitType() = throw(ErrorException("3")) (::EightBitType)() = throw(ErrorException("4")) EightBitTypeT() = throw(ErrorException("5")) -(::Type{EightBitTypeT{T}})() where {T} = throw(ErrorException("6")) +EightBitTypeT{T}() where {T} = throw(ErrorException("6")) (::EightBitTypeT)() = throw(ErrorException("7")) (::FunctionLike)() = throw(ErrorException("8"))