Skip to content

Commit

Permalink
Update EltypeExtensions.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
putianyi889 authored Nov 13, 2024
1 parent d42e363 commit bc5b89d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/EltypeExtensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ export elconvert, basetype, baseconvert, precisiontype, precisionconvert
_to_eltype(::Type{T}, ::Type{UpperHessenberg{S,M}}) where {T,S,M} = UpperHessenberg{T,_to_eltype(T,M)}
elconvert(::Type{T}, A::UpperHessenberg{S,M}) where {T,S,M} = UpperHessenberg{T,_to_eltype(T,M)}(A)
end
@static if VERSION >= v"1.5"
@inline bigfloatconvert(x, prec) = BigFloat(x, precision = prec)
else
@inline bigfloatconvert(x, prec) = BigFloat(x, prec)
end
@static if VERSION >= v"1.9"
elconvert(::Type{T}, A::S) where {T,S<:Bidiagonal} = convert(_to_eltype(T, S), A)
else
elconvert(::Type{T}, A::Bidiagonal{S,V}) where {T,S,V} = Bidiagonal{T,_to_eltype(T,V)}(A.dv, A.ev, A.uplo)
end
@static if VERSION >= v"1.10"
elconvert(::Type{T}, A::AbstractQ) where T = convert(AbstractQ{T}, A) # see https://github.com/JuliaLang/julia/pull/46196
@inline bigfloatconvert(x, prec) = BigFloat(x, precision = prec)
else
@inline bigfloatconvert(x, prec) = BigFloat(x, prec)
end

"""
Expand Down

0 comments on commit bc5b89d

Please sign in to comment.