From f9af1256849ea5fdde5b7de372cd12a6272d9a67 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 3 Jan 2023 07:24:02 +0100 Subject: [PATCH] Specialize cholcopy to avoid scalar indexing. (#1716) --- lib/cusolver/linalg.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cusolver/linalg.jl b/lib/cusolver/linalg.jl index 94ef46f168..fc957b2030 100644 --- a/lib/cusolver/linalg.jl +++ b/lib/cusolver/linalg.jl @@ -356,4 +356,7 @@ if VERSION >= v"1.8-" C, info = LinearAlgebra._chol!(copy(parent(A)), A.uplo == 'U' ? UpperTriangular : LowerTriangular) return Cholesky(C.data, A.uplo, info) end + + LinearAlgebra.cholcopy(A::LinearAlgebra.RealHermSymComplexHerm{<:Any,<:CuArray}) = + copyto!(similar(A, LinearAlgebra.choltype(A)), A) end