Skip to content

Commit

Permalink
replace AbstractTriangular by UpperOrLowerTriangular
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Jul 11, 2023
1 parent ce39026 commit 480c479
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/LazyArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,19 @@ import Base.Broadcast: BroadcastStyle, AbstractArrayStyle, Broadcasted, broadcas
combine_eltypes, DefaultArrayStyle, instantiate, materialize,
materialize!, eltypes

import LinearAlgebra: AbstractTriangular, AbstractQ, checksquare, pinv, fill!, tilebufsize, dot, factorize, qr, lu, cholesky,
import LinearAlgebra: AbstractQ, checksquare, pinv, fill!, tilebufsize, dot, factorize, qr, lu, cholesky,
norm2, norm1, normInf, normp, normMinusInf, diag, det, logabsdet, tr, AdjOrTrans, triu, tril,
lmul!, rmul!, StructuredMatrixStyle

if VERSION v"1.11.0-DEV.21"
using LinearAlgebra: UpperOrLowerTriangular
else
const UpperOrLowerTriangular{T,S} = Union{LinearAlgebra.UpperTriangular{T,S},
LinearAlgebra.UnitUpperTriangular{T,S},
LinearAlgebra.LowerTriangular{T,S},
LinearAlgebra.UnitLowerTriangular{T,S}}
end

import LinearAlgebra.BLAS: BlasFloat, BlasReal, BlasComplex

import FillArrays: AbstractFill, getindex_value
Expand Down
2 changes: 1 addition & 1 deletion src/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ end
@inline _isfinite_getindex(A::Adjoint{T, <:AbstractCachedVector{T}}, kr, maxkr::Int) where T = conj(parent(A)[kr])


for Wrap in (:AbstractTriangular, :AdjOrTrans)
for Wrap in (:UpperOrLowerTriangular, :AdjOrTrans)
@eval begin
@inline getindex(A::$Wrap{T, <:AbstractCachedArray{T}}, k::Integer, jr::AbstractUnitRange) where T = _isfinite_getindex(A, k, jr, k, maximum(jr))
@inline getindex(A::$Wrap{T, <:AbstractCachedArray{T}}, kr::AbstractUnitRange, j::Integer) where T = _isfinite_getindex(A, kr, j, maximum(kr), j)
Expand Down

0 comments on commit 480c479

Please sign in to comment.