Skip to content

Commit

Permalink
Bypass issues with Julia 1.11 (better fix wanted)
Browse files Browse the repository at this point in the history
  • Loading branch information
projekter committed Dec 25, 2024
1 parent 87e32b2 commit 686310d
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions src/lapack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -788,24 +788,36 @@ macro pmalso(scaled, fun=nothing)
end)
end

"""
spmv!(α, AP::SPMatrixUnscaled, x, β)
"""
spmv!::Real, AP::SPMatrixUnscaled, args...) = spmv!(packed_ulchar(AP), α, vec(AP), args...)
@doc replace(@doc(spmv!).meta[:results][1].text[1],
" spmv!(uplo, α, AP, x, β, y)" => " spmv!(uplo, α, AP::AbstractVector, x, β, y)
spmv!(α, AP::SPMatrixUnscaled, x, β, y)") spmv!
# The following replacements are broken in 1.11. While @doc(spmv!) returns a Markdown.MD object when tested, it appears that
# during precompilation, it instead gives a DocStr, which does not have meta. Until we figure out a better way, use the poor
# man's substitute docs.
# @doc replace(@doc(spmv!).meta[:results][1].text[1],
# " spmv!(uplo, α, AP, x, β, y)" => " spmv!(uplo, α, AP::AbstractVector, x, β, y)
# spmv!(α, AP::SPMatrixUnscaled, x, β, y)") spmv!

"""
hpmv!(α, AP::SPMatrixUnscaled, x, β, y)
"""
hpmv!::Number, AP::SPMatrixUnscaled, args...) = hpmv!(packed_ulchar(AP), α, vec(AP), args...)
@doc replace(@doc(spmv!).meta[:results][1].text[1],
" hpmv!(uplo, α, AP, x, β, y)" => " hpmv!(uplo, α, AP::AbstractVector, x, β, y)
hpmv!(α, AP::SPMatrixUnscaled, x, β, y)") hpmv!
# @doc replace(@doc(spmv!).meta[:results][1].text[1],
# " hpmv!(uplo, α, AP, x, β, y)" => " hpmv!(uplo, α, AP::AbstractVector, x, β, y)
# hpmv!(α, AP::SPMatrixUnscaled, x, β, y)") hpmv!

"""
spr!(α, x, AP::SPMatrix)$warnunscale
"""
function spr!::Real, x::AbstractArray{T}, AP::SPMatrix{T}) where {T<:BlasReal}
AP = packed_unscale!(AP)
spr!(packed_ulchar(AP), α, x, vec(AP))
return AP
end
@doc (replace(@doc(spr!).meta[:results][1].text[1],
" spr!(uplo, α, x, AP)" => " spr!(uplo, α, x, AP::AbstractVector)
spr!(α, x, AP::SPMatrix)") * warnunscale) spr!
# @doc (replace(@doc(spr!).meta[:results][1].text[1],
# " spr!(uplo, α, x, AP)" => " spr!(uplo, α, x, AP::AbstractVector)
# spr!(α, x, AP::SPMatrix)") * warnunscale) spr!

@pmalso :unscale function hpr!(uplo::AbstractChar, α::Real, x::AbstractVector{T}, AP::PM{T}) where {T<:BlasComplex}
require_one_based_indexing(APv, x)
Expand Down

2 comments on commit 686310d

@projekter
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/121986

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.4 -m "<description of version>" 686310d267721e8f329e2ef5b35b261db1fac343
git push origin v1.0.4

Please sign in to comment.