Skip to content

Commit 9e3931c

Browse files
committed
Also rename LAPACK version
1 parent ae761e5 commit 9e3931c

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

NEWS.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,12 @@ Deprecated or removed
332332
* `diagm(A::SparseMatrixCSC)` has been deprecated in favor of
333333
`spdiagm(sparsevec(A))` ([#23341]).
334334

335+
* `diagm(A::BitMatrix)` has been deprecated, use `diagm(vec(A))` instead ([#23373]).
336+
335337
* `GMP.gmp_version()`, `GMP.GMP_VERSION`, `GMP.gmp_bits_per_limb()`, and `GMP.GMP_BITS_PER_LIBM`
336338
have been renamed to `GMP.version()`, `GMP.VERSION`, `GMP.bits_per_libm()`, and `GMP.BITS_PER_LIBM`,
337-
respectively. Similarly, `MPFR.get_version()`, has been renamed to `MPFR.version()` ([#23323]).
338-
339-
* `diagm(A::BitMatrix)` has been deprecated, use `diagm(vec(A))` instead ([#23373]).
339+
respectively. Similarly, `MPFR.get_version()`, has been renamed to `MPFR.version()` ([#23323]). Also,
340+
`LinAlg.LAPACK.laver()` has been renamed to `LinAlg.LAPACK.version()` and now returns a `VersionNumber`.
340341

341342
Command-line option changes
342343
---------------------------

base/deprecated.jl

+5-4
Original file line numberDiff line numberDiff line change
@@ -1716,15 +1716,16 @@ export hex2num
17161716
# PR 23341
17171717
@deprecate diagm(A::SparseMatrixCSC) spdiagm(sparsevec(A))
17181718

1719+
# PR #23373
1720+
@deprecate diagm(A::BitMatrix) diagm(vec(A))
1721+
17191722
# PR 23341
17201723
@eval GMP @deprecate gmp_version() version() false
17211724
@eval GMP @Base.deprecate_binding GMP_VERSION VERSION false
1722-
@eval GMP @deprecate gmp_bits_per_libm() bits_per_libm() false
1725+
@eval GMP @deprecate gmp_bits_per_limb() bits_per_limb() false
17231726
@eval GMP @Base.deprecate_binding GMP_BITS_PER_LIMB BITS_PER_LIMB false
17241727
@eval MPFR @deprecate get_version() version() false
1725-
1726-
# PR #23373
1727-
@deprecate diagm(A::BitMatrix) diagm(vec(A))
1728+
@eval LinAlg.LAPACK @deprecate laver() version() false
17281729

17291730
# END 0.7 deprecations
17301731

base/linalg/lapack.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ function chkfinite(A::StridedMatrix)
9292
end
9393

9494
# LAPACK version number
95-
function laver()
95+
function version()
9696
major = Ref{BlasInt}(0)
9797
minor = Ref{BlasInt}(0)
9898
patch = Ref{BlasInt}(0)
9999
ccall((@blasfunc(ilaver_), liblapack), Void,
100-
(Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}),
101-
major, minor, patch)
102-
return major[], minor[], patch[]
100+
(Ptr{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}),
101+
major, minor, patch)
102+
return VersionNumber(major[], minor[], patch[])
103103
end
104104

105105
# (GB) general banded matrices, LU decomposition and solver

base/linalg/svd.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ end
193193
"""
194194
function svdfact!(A::StridedMatrix{T}, B::StridedMatrix{T}) where T<:BlasFloat
195195
# xggsvd3 replaced xggsvd in LAPACK 3.6.0
196-
if LAPACK.laver() < (3, 6, 0)
196+
if LAPACK.version() < v"3.6.0"
197197
U, V, Q, a, b, k, l, R = LAPACK.ggsvd!('U', 'V', 'Q', A, B)
198198
else
199199
U, V, Q, a, b, k, l, R = LAPACK.ggsvd3!('U', 'V', 'Q', A, B)
@@ -290,7 +290,7 @@ end
290290

291291
function svdvals!(A::StridedMatrix{T}, B::StridedMatrix{T}) where T<:BlasFloat
292292
# xggsvd3 replaced xggsvd in LAPACK 3.6.0
293-
if LAPACK.laver() < (3, 6, 0)
293+
if LAPACK.version() < v"3.6.0"
294294
_, _, _, a, b, k, l, _ = LAPACK.ggsvd!('N', 'N', 'N', A, B)
295295
else
296296
_, _, _, a, b, k, l, _ = LAPACK.ggsvd3!('N', 'N', 'N', A, B)

0 commit comments

Comments
 (0)