@@ -33,7 +33,7 @@ import Base.Broadcast: BroadcastStyle, AbstractArrayStyle, Broadcasted, broadcas
3333 materialize!, eltypes
3434
3535import LinearAlgebra: AbstractTriangular, AbstractQ, checksquare, pinv, fill!, tilebufsize, Abuf, Bbuf, Cbuf, dot, factorize, qr, lu, cholesky,
36- norm2, norm1, normInf, normMinusInf
36+ norm2, norm1, normInf, normMinusInf, qr, lu, qr!, lu!
3737
3838import LinearAlgebra. BLAS: BlasFloat, BlasReal, BlasComplex
3939
@@ -85,6 +85,7 @@ macro layoutmatrix(Typ)
8585 ArrayLayouts. @layoutldiv $ Typ
8686 ArrayLayouts. @layoutmul $ Typ
8787 ArrayLayouts. @layoutlmul $ Typ
88+ ArrayLayouts. @layoutfactorizations $ Typ
8889
8990 @inline Base. getindex (A:: $Typ , kr:: Colon , jr:: Colon ) = ArrayLayouts. layout_getindex (A, kr, jr)
9091 @inline Base. getindex (A:: $Typ , kr:: Colon , jr:: AbstractUnitRange ) = ArrayLayouts. layout_getindex (A, kr, jr)
9899
99100@layoutmatrix LayoutMatrix
100101
102+ _copyto! (_, _, dest:: AbstractArray{T,N} , src:: AbstractArray{V,N} ) where {T,V,N} =
103+ Base. invoke (copyto!, Tuple{AbstractArray{T,N},AbstractArray{V,N}}, dest, src)
104+
105+
106+ copyto! (dest:: LayoutArray{<:Any,N} , src:: LayoutArray{<:Any,N} ) where N =
107+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
108+ copyto! (dest:: AbstractArray{<:Any,N} , src:: LayoutArray{<:Any,N} ) where N =
109+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
110+ copyto! (dest:: LayoutArray{<:Any,N} , src:: AbstractArray{<:Any,N} ) where N =
111+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
112+
113+ copyto! (dest:: SubArray{<:Any,N,<:LayoutArray} , src:: SubArray{<:Any,N,<:LayoutArray} ) where N =
114+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
115+ copyto! (dest:: SubArray{<:Any,N,<:LayoutArray} , src:: LayoutArray{<:Any,N} ) where N =
116+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
117+ copyto! (dest:: LayoutArray{<:Any,N} , src:: SubArray{<:Any,N,<:LayoutArray} ) where N =
118+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
119+ copyto! (dest:: SubArray{<:Any,N,<:LayoutArray} , src:: AbstractArray{<:Any,N} ) where N =
120+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
121+ copyto! (dest:: AbstractArray{<:Any,N} , src:: SubArray{<:Any,N,<:LayoutArray} ) where N =
122+ _copyto! (MemoryLayout (typeof (dest)), MemoryLayout (typeof (src)), dest, src)
123+
124+
125+
101126zero! (A:: AbstractArray{T} ) where T = fill! (A,zero (T))
102127function zero! (A:: AbstractArray{<:AbstractArray} )
103128 for a in A
0 commit comments