1
- struct QLayout <: MemoryLayout end
1
+ abstract type AbstractQLayout <: MemoryLayout end
2
+ struct QLayout <: AbstractQLayout end
2
3
3
4
MemoryLayout (:: Type{<:AbstractQ} ) = QLayout ()
4
5
5
- transposelayout (:: QLayout ) = QLayout ()
6
+ adjointlayout (:: Type , :: AbstractQLayout ) = QLayout ()
6
7
7
8
8
- copy (M:: Lmul{QLayout } ) = copyto! (similar (M), M)
9
+ copy (M:: Lmul{<:AbstractQLayout } ) = copyto! (similar (M), M)
9
10
10
- function copyto! (dest:: AbstractArray{T} , M:: Lmul{QLayout } ) where T
11
+ function copyto! (dest:: AbstractArray{T} , M:: Lmul{<:AbstractQLayout } ) where T
11
12
A,B = M. A,M. B
12
13
if size (dest,1 ) == size (B,1 )
13
14
copyto! (dest, B)
@@ -18,13 +19,15 @@ function copyto!(dest::AbstractArray{T}, M::Lmul{QLayout}) where T
18
19
materialize! (Lmul (A,dest))
19
20
end
20
21
21
- function copyto! (dest:: AbstractArray , M:: Ldiv{QLayout } )
22
+ function copyto! (dest:: AbstractArray , M:: Ldiv{<:AbstractQLayout } )
22
23
A,B = M. A,M. B
23
24
copyto! (dest, B)
24
25
materialize! (Ldiv (A,dest))
25
26
end
26
27
27
- materialize! (M:: Ldiv{QLayout} ) = materialize! (Lmul (M. A' ,M. B))
28
+ materialize! (M:: Lmul{LAY} ) where LAY<: AbstractQLayout = error (" Overload materialize!(::Lmul{$(LAY) })" )
29
+ materialize! (M:: Rmul{LAY} ) where LAY<: AbstractQLayout = error (" Overload materialize!(::Lmul{$(LAY) })" )
30
+ materialize! (M:: Ldiv{<:AbstractQLayout} ) = materialize! (Lmul (M. A' ,M. B))
28
31
29
32
_qr (layout, axes, A; kwds... ) = Base. invoke (qr, Tuple{AbstractMatrix{eltype (A)}}, A; kwds... )
30
33
_qr (layout, axes, A, pivot:: P ; kwds... ) where P = Base. invoke (qr, Tuple{AbstractMatrix{eltype (A)},P}, A, pivot; kwds... )
0 commit comments