@@ -143,10 +143,10 @@ using LinearAlgebra: Factorization, AbstractQ, QRCompactWY, QRCompactWYQ, QRPack
143143LinearAlgebra. qr! (A:: CuMatrix{T} ) where T = QR (geqrf! (A:: CuMatrix{T} )... )
144144
145145# conversions
146- CuMatrix (F:: Union{QR,QRCompactWY} ) = CuArray (AbstractArray (F))
147- CuArray (F:: Union{QR,QRCompactWY} ) = CuMatrix (F)
148- CuMatrix (F:: QRPivoted ) = CuArray (AbstractArray (F))
149- CuArray (F:: QRPivoted ) = CuMatrix (F)
146+ CUDA . CuMatrix (F:: Union{QR,QRCompactWY} ) = CuArray (AbstractArray (F))
147+ CUDA . CuArray (F:: Union{QR,QRCompactWY} ) = CuMatrix (F)
148+ CUDA . CuMatrix (F:: QRPivoted ) = CuArray (AbstractArray (F))
149+ CUDA . CuArray (F:: QRPivoted ) = CuMatrix (F)
150150
151151function LinearAlgebra. ldiv! (_qr:: QR , b:: CuVector )
152152 m,n = size (_qr)
@@ -174,16 +174,16 @@ end
174174# AbstractQ's `size` is the size of the full matrix,
175175# while `Matrix(Q)` only gives the compact Q.
176176# See JuliaLang/julia#26591 and JuliaGPU/CUDA.jl#969.
177- CuArray (Q:: AbstractQ ) = CuMatrix (Q)
178- CuArray {T} (Q:: AbstractQ ) where {T} = CuMatrix {T} (Q)
179- CuMatrix (Q:: AbstractQ{T} ) where {T} = CuMatrix {T} (Q)
180- CuMatrix {T} (Q:: QRPackedQ{S} ) where {T,S} =
177+ CUDA . CuArray (Q:: AbstractQ ) = CuMatrix (Q)
178+ CUDA . CuArray {T} (Q:: AbstractQ ) where {T} = CuMatrix {T} (Q)
179+ CUDA . CuMatrix (Q:: AbstractQ{T} ) where {T} = CuMatrix {T} (Q)
180+ CUDA . CuMatrix {T} (Q:: QRPackedQ{S} ) where {T,S} =
181181 CuMatrix {T} (lmul! (Q, CuMatrix {S} (I, size (Q, 1 ), min (size (Q. factors)... ))))
182- CuMatrix {T, B} (Q:: QRPackedQ{S} ) where {T, B, S} = CuMatrix {T} (Q)
183- CuMatrix {T} (Q:: QRCompactWYQ ) where {T} = error (" QRCompactWY format is not supported" )
182+ CUDA . CuMatrix {T, B} (Q:: QRPackedQ{S} ) where {T, B, S} = CuMatrix {T} (Q)
183+ CUDA . CuMatrix {T} (Q:: QRCompactWYQ ) where {T} = error (" QRCompactWY format is not supported" )
184184# avoid the CPU array in the above mul!
185- Matrix {T} (Q:: QRPackedQ{S,<:CuArray,<:CuArray} ) where {T,S} = Array (CuMatrix {T} (Q))
186- Matrix {T} (Q:: QRCompactWYQ{S,<:CuArray,<:CuArray} ) where {T,S} = Array (CuMatrix {T} (Q))
185+ Base . Matrix {T} (Q:: QRPackedQ{S,<:CuArray,<:CuArray} ) where {T,S} = Array (CuMatrix {T} (Q))
186+ Base . Matrix {T} (Q:: QRCompactWYQ{S,<:CuArray,<:CuArray} ) where {T,S} = Array (CuMatrix {T} (Q))
187187
188188function Base. getindex (Q:: QRPackedQ{<:Any, <:CuArray} , :: Colon , j:: Int )
189189 y = CUDA. zeros (eltype (Q), size (Q, 2 ))
0 commit comments